From 1c275a61c5d92c46530240a6a5497c4cb64832fa Mon Sep 17 00:00:00 2001 From: Nikolai Hartmann <Nikolai.Hartmann@physik.uni-muenchen.de> Date: Tue, 28 Aug 2018 18:20:38 +0200 Subject: [PATCH] plot_profile_2D_all maybe working --- plotting.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plotting.py b/plotting.py index 10d61e1..d1d1d28 100644 --- a/plotting.py +++ b/plotting.py @@ -20,9 +20,9 @@ logger.addHandler(logging.NullHandler()) 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." - fig.savefig(filename) + fig.savefig(filename, **kwargs) try: get_ipython plt.show() @@ -234,8 +234,8 @@ def plot_NN_vs_var_2D_all(plotname, model, means, save_show(plt, fig, plotname, bbox_inches='tight') -def plot_profile_2D_all(plotname, model, - events, +def plot_profile_2D_all(plotname, model, events, + varx_index, vary_index, nbinsx, xmin, xmax, nbinsy, ymin, ymax, transform_function=None, @@ -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." + valsx = np.array(events[:,varx_index]) + valsy = np.array(events[:,vary_index]) + # transform if transform_function is not None: events = transform_function(events) -- GitLab