Skip to content
Snippets Groups Projects
Commit 052ccbdd authored by Nikolai's avatar Nikolai
Browse files

switch plotting to save_show

parent e1ee8496
No related branches found
No related tags found
No related merge requests found
...@@ -60,8 +60,7 @@ def plot_NN_vs_var_1D(plotname, means, scorefun, var_index, var_range, var_label ...@@ -60,8 +60,7 @@ def plot_NN_vs_var_1D(plotname, means, scorefun, var_index, var_range, var_label
if var_label is not None: if var_label is not None:
ax.set_xlabel(var_label) ax.set_xlabel(var_label)
ax.set_ylabel("NN output") ax.set_ylabel("NN output")
fig.savefig(plotname) save_show(plt, fig, plotname)
plt.close(fig)
def plot_NN_vs_var_2D(plotname, means, def plot_NN_vs_var_2D(plotname, means,
...@@ -134,8 +133,7 @@ def plot_NN_vs_var_2D(plotname, means, ...@@ -134,8 +133,7 @@ def plot_NN_vs_var_2D(plotname, means,
ax.set_xlabel(varx_label) ax.set_xlabel(varx_label)
if vary_label is not None: if vary_label is not None:
ax.set_ylabel(vary_label) ax.set_ylabel(vary_label)
fig.savefig(plotname) save_show(plt, fig, plotname)
plt.close(fig)
def plot_NN_vs_var_2D_all(plotname, model, means, def plot_NN_vs_var_2D_all(plotname, model, means,
...@@ -233,8 +231,7 @@ def plot_NN_vs_var_2D_all(plotname, model, means, ...@@ -233,8 +231,7 @@ def plot_NN_vs_var_2D_all(plotname, model, means,
cb.ax.xaxis.set_ticks_position('top') cb.ax.xaxis.set_ticks_position('top')
cb.ax.xaxis.set_label_position('top') cb.ax.xaxis.set_label_position('top')
fig.savefig(plotname, bbox_inches='tight') save_show(plt, fig, plotname, bbox_inches='tight')
plt.close(fig)
def plot_hist_2D(plotname, xedges, yedges, hist, varx_label=None, vary_label=None, log=False, zlabel="# of events"): def plot_hist_2D(plotname, xedges, yedges, hist, varx_label=None, vary_label=None, log=False, zlabel="# of events"):
...@@ -252,9 +249,7 @@ def plot_hist_2D(plotname, xedges, yedges, hist, varx_label=None, vary_label=Non ...@@ -252,9 +249,7 @@ def plot_hist_2D(plotname, xedges, yedges, hist, varx_label=None, vary_label=Non
cbar.set_label(zlabel) cbar.set_label(zlabel)
ax.set_ylabel(vary_label) ax.set_ylabel(vary_label)
ax.set_xlabel(varx_label) ax.set_xlabel(varx_label)
fig.savefig(plotname) save_show(plt, fig, plotname)
plt.close(fig)
def plot_hist_2D_events(plotname, valsx, valsy, nbinsx, xmin, xmax, nbinsy, ymin, ymax, def plot_hist_2D_events(plotname, valsx, valsy, nbinsx, xmin, xmax, nbinsy, ymin, ymax,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment