From d89e90c1413fd8c56899bce4a42d952f6edaec2c Mon Sep 17 00:00:00 2001 From: aldbr Date: Tue, 19 Sep 2023 12:05:31 +0200 Subject: [PATCH] fix: ColorBar.draw_all() is replaced by figure.draw_without_rendering() --- src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py b/src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py index 809b33f119e..f3c913ed8bd 100644 --- a/src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py +++ b/src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py @@ -8,6 +8,7 @@ from __future__ import print_function import datetime +import sys from pylab import setp from matplotlib.colors import Normalize import matplotlib.cm as cm @@ -181,7 +182,10 @@ def draw(self): cb = ColorbarBase( cax, cmap=self.cmap, norm=self.norms, boundaries=self.cbBoundaries, values=self.cbValues, ticks=self.cbTicks ) - cb.draw_all() + if sys.version_info.major < 3: + cb.draw_all() + else: + self.figure.draw_without_rendering() # cb = self.ax.colorbar( self.mapper, format="%d%%", # orientation='horizontal', fraction=0.04, pad=0.1, aspect=40 ) # setp( cb.outline, linewidth=.5 )