Skip to content

Commit

Permalink
modified scripts/plot_proftrace.py to close figures after saving to file
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettHoover-NOAA committed Dec 2, 2024
1 parent 70d4cfd commit 48c6335
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/plot_proftrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,12 +1074,14 @@ def plot_cpen_traces(penList, countList, nameList, dateList,
plt.ioff()
fig_prof.savefig(errProName, bbox_inches='tight',
facecolor='w')
plt.close()
if penProName is not None:
fig_prof = plot_cpen_profiles(cpen_profs, nobs_profs,
name_list, levl_profs)
plt.ioff()
fig_prof.savefig(penProName, bbox_inches='tight',
facecolor='w')
plt.close()
#
# Generate trace plots
#
Expand All @@ -1090,13 +1092,15 @@ def plot_cpen_traces(penList, countList, nameList, dateList,
plt.ioff()
fig_trace.savefig(errTraName, bbox_inches='tight',
facecolor='w')
plt.close()
if penTraName is not None:
fig_trace = plot_cpen_traces(cpen_trace, nobs_trace,
name_list, date_trace,
tskip=tskip)
plt.ioff()
fig_trace.savefig(penTraName, bbox_inches='tight',
facecolor='w')
plt.close()
##############################################################
else:
print('No Figure Cards Found, Exiting...')

0 comments on commit 48c6335

Please sign in to comment.