Skip to content

Commit

Permalink
fix: ColorBar.draw_all() is replaced by figure.draw_without_rendering()
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Sep 19, 2023
1 parent 0c44a0e commit d89e90c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit d89e90c

Please sign in to comment.