From 1da05a9703efa7a32f10295da5bbaf736bbbc74c Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 18 Sep 2023 00:41:20 +0100 Subject: [PATCH] fix(plots): provide axis for colorbar Necessary for for matplotlib 3.8 Reference: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#changes-of-api-after-deprecation --- pyneuroml/plot/PlotMorphology.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyneuroml/plot/PlotMorphology.py b/pyneuroml/plot/PlotMorphology.py index 61651e86c..abe4d8d25 100644 --- a/pyneuroml/plot/PlotMorphology.py +++ b/pyneuroml/plot/PlotMorphology.py @@ -476,6 +476,7 @@ def plot_2D_cell_morphology( norm = matplotlib.colors.Normalize(vmin=data_min, vmax=data_max) fig.colorbar( matplotlib.cm.ScalarMappable(norm=norm, cmap=acolormap), + ax=ax, label=overlay_data_label, ) @@ -1106,6 +1107,7 @@ def plot_segment_groups_curtain_plots( norm = matplotlib.colors.Normalize(vmin=data_min, vmax=data_max) fig.colorbar( matplotlib.cm.ScalarMappable(norm=norm, cmap=acolormap), + ax=ax, label=overlay_data_label, )