Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16b855b

Browse files
committed
use image zorder when drawing
svn path=/trunk/matplotlib/; revision=7950
1 parent 1149215 commit 16b855b

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2009-11-10 Single images, and all images in renderers with
2+
option_image_nocomposite (i.e. agg, macosx and the svg
3+
backend when rcParams['svg.image_noscale'] is True), are
4+
now drawn respecting the zorder relative to other
5+
artists. (Note that there may now be inconsistencies across
6+
backends when more than one image is drawn at varying
7+
zorders, but this change introduces correct behavior for
8+
the backends in which it's easy to do so.)
9+
110
2009-10-21 Make AutoDateLocator more configurable by adding options
211
to control the maximum and minimum number of ticks. Also
312
add control of the intervals to be used for ticking. This

lib/matplotlib/axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,8 @@ def draw(self, renderer=None, inframe=False):
17211721

17221722
if len(self.images)<=1 or renderer.option_image_nocomposite():
17231723
for im in self.images:
1724-
im.draw(renderer)
1724+
dsu.append( (im.zorder, len(dsu), im) )
1725+
dsu.sort() # re-sort with images now
17251726
else:
17261727
# make a composite image blending alpha
17271728
# list of (mimage.Image, ox, oy)

0 commit comments

Comments
 (0)