From 1d76650093689344fb65e1fdb01a9d79d8e83859 Mon Sep 17 00:00:00 2001 From: "Marios S. Kyriakou" Date: Thu, 11 Jul 2024 12:02:16 +0300 Subject: [PATCH] minor fix MatplotlibDeprecationWarning --- epyt/epanet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epyt/epanet.py b/epyt/epanet.py index 52472bd..ce4f755 100644 --- a/epyt/epanet.py +++ b/epyt/epanet.py @@ -10271,7 +10271,7 @@ def plot(self, title=None, line=None, point=None, nodesID=None, if fix_colorbar and link_values is not None or node_values is not None: scal = cm.ScalarMappable(norm=mpl.colors.Normalize(min_colorbar, max_colorbar), cmap=colorbar) - bar = plt.colorbar(scal, orientation='horizontal', shrink=0.7, pad=0.05) + bar = plt.colorbar(scal, ax=plt.gca(), orientation='horizontal', shrink=0.7, pad=0.05) bar.ax.tick_params(labelsize=fontsize) bar.outline.set_visible(False) bar.set_label(label=colorbar_label, size=fontsize)