--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Thu Apr 21 17:51:29 2016 +0300
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Thu Apr 21 19:14:28 2016 +0300
@@ -41,6 +41,12 @@
from DebugVariableViewer import *
from GraphButton import GraphButton
+from distutils.version import LooseVersion +if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"): + from cycler import cycler # Graph variable display type
GRAPH_PARALLEL, GRAPH_ORTHOGONAL = range(2)
@@ -975,7 +981,13 @@
kwargs["transform"] = self.Axes.transAxes
return text_func(*args, **kwargs)
+ def SetAxesColor(self, color): + if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"): + self.Axes.set_prop_cycle(cycler('color',color)) + self.Axes.set_color_cycle(color) Reset figure and graphical elements displayed in it
@@ -987,7 +999,7 @@
# Add 3D projection if graph is in 3D
self.Axes = self.Figure.gca(projection='3d')
- self.Axes.set_color_cycle(['b'])
+ self.SetAxesColor(['b']) # Override function to prevent too much refresh when graph is
@@ -1002,7 +1014,7 @@
self.Axes = self.Figure.gca()
- self.Axes.set_color_cycle(COLOR_CYCLE)
+ self.SetAxesColor(COLOR_CYCLE) # Set size of X and Y axis labels
self.Axes.tick_params(axis='x', labelsize='small')