|
From: <ef...@us...> - 2009-12-21 19:49:31
|
Revision: 8049
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8049&view=rev
Author: efiring
Date: 2009-12-21 19:49:17 +0000 (Mon, 21 Dec 2009)
Log Message:
-----------
zorder support in figure: use same sort idiom as in axes
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2009-12-21 03:49:59 UTC (rev 8048)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2009-12-21 19:49:17 UTC (rev 8049)
@@ -33,6 +33,8 @@
import matplotlib.cbook as cbook
from matplotlib import docstring
+from operator import itemgetter
+
docstring.interpd.update(projection_names = get_projection_names())
class SubplotParams:
@@ -742,8 +744,6 @@
# a list of (zorder, func_to_call, list_of_args)
dsu = []
-
- # todo: respect zorder
for a in self.patches:
dsu.append( (a.get_zorder(), a.draw, [renderer]))
@@ -797,8 +797,7 @@
for a in self.legends:
dsu.append( (a.get_zorder(), a.draw, [renderer]))
-
- dsu.sort(key=lambda x: x[0])
+ dsu.sort(key=itemgetter(0))
for zorder, func, args in dsu:
func(*args)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|