Skip to content
Snippets Groups Projects
Commit 1c275a61 authored by Nikolai.Hartmann's avatar Nikolai.Hartmann
Browse files

plot_profile_2D_all maybe working

parent 8321da68
No related branches found
No related tags found
No related merge requests found
...@@ -20,9 +20,9 @@ logger.addHandler(logging.NullHandler()) ...@@ -20,9 +20,9 @@ logger.addHandler(logging.NullHandler())
Some further plotting functions Some further plotting functions
""" """
def save_show(plt, fig, filename): def save_show(plt, fig, filename, **kwargs):
"Save a figure and show it in case we are in ipython or jupyter notebook." "Save a figure and show it in case we are in ipython or jupyter notebook."
fig.savefig(filename) fig.savefig(filename, **kwargs)
try: try:
get_ipython get_ipython
plt.show() plt.show()
...@@ -234,8 +234,8 @@ def plot_NN_vs_var_2D_all(plotname, model, means, ...@@ -234,8 +234,8 @@ def plot_NN_vs_var_2D_all(plotname, model, means,
save_show(plt, fig, plotname, bbox_inches='tight') save_show(plt, fig, plotname, bbox_inches='tight')
def plot_profile_2D_all(plotname, model, def plot_profile_2D_all(plotname, model, events,
events, varx_index, vary_index,
nbinsx, xmin, xmax, nbinsx, xmin, xmax,
nbinsy, ymin, ymax, nbinsy, ymin, ymax,
transform_function=None, transform_function=None,
...@@ -248,6 +248,9 @@ def plot_profile_2D_all(plotname, model, ...@@ -248,6 +248,9 @@ def plot_profile_2D_all(plotname, model,
"Similar to plot_NN_2D, but creates a grid of plots for all neurons." "Similar to plot_NN_2D, but creates a grid of plots for all neurons."
valsx = np.array(events[:,varx_index])
valsy = np.array(events[:,vary_index])
# transform # transform
if transform_function is not None: if transform_function is not None:
events = transform_function(events) events = transform_function(events)
......
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