Commit 9315407b authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

Changed the inline loops in myAxes

In MyAxes.update we wrote some inline loops
that are not compatible with python2.6

I just wrote them in not inline mode, it shoudl work
parent 7415e5c8
......@@ -114,8 +114,19 @@ class MyAxes(Axes):
# Because matplotlib.axes.update expect kwargs and not **kwargs ... (stupid!!)
if args: # catch matplotlib kwargs
kwargs = args[0]
kw_for_axes = {key: value for (key, value) in args[0].items() if key not in self.keywords}
# kw_for_axes = {key: value for (key, value) in args[0].items() if key not in self.keywords} # Not compatible with python2.6
kw_for_axes = {}
for (key, value) in args[0].items():
if key not in self.keywords:
kw_for_axes.update({key: value})
Axes.update(self, kw_for_axes) # update matplotlib.Axes
# myplotlib update
self.keywords.update({key: value for (key, value) in kwargs.items() if key in self.keywords})
# self.keywords.update({key: value for (key, value) in kwargs.items() if key in self.keywords}) # Not compatible with python2.6
for (key, value) in kwargs.items():
if key in self.keywords:
self.keywords.update({key: value})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment