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)