diff --git a/plotting.py b/plotting.py
index 10d61e16b3adc90cb9f81a24c07dfbf34e7096ac..d1d1d286ec54294c368033ed658da42ea3ccb883 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)