Skip to content

Commit cbee551

Browse files
committed
moved optional rec2* packages out of mlab and into toolkits
svn path=/trunk/matplotlib/; revision=4720
1 parent 84c4130 commit cbee551

File tree

7 files changed

+28
-377
lines changed

7 files changed

+28
-377
lines changed

API_CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Moved rec2gtk to matplotlib.toolkits.gtktools
2+
3+
Moved rec2excel to matplotlib.toolkits.exceltools
4+
5+
16
Removed, dead/experimental ExampleInfo, Namespace and Importer
27
code from matplotlib/__init__.py
38
0.91.1 Released

CODING_GUIDE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ noise in svn diffs. If you are an emacs user, the following in your
113113
.emacs will cause emacs to strip trailing white space on save for
114114
python, C and C++
115115

116+
117+
When importing modules from the matplotlib namespace
118+
119+
import matplotlib.cbook as cbook # DO
120+
from matplotlib import cbook #DONT
121+
122+
because the latter is ambiguous whether cbook is a module or a
123+
function to the new developer. The former makes it explcit that you
124+
are importing a module or package.
125+
116126
; and similarly for c++-mode-hook and c-mode-hook
117127
(add-hook 'python-mode-hook
118128
(lambda ()

examples/figimage_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
im1 = figimage(Z, xo=50, yo=0)
1414
im2 = figimage(Z, xo=100, yo=100, alpha=.8)
1515
#gray() # overrides current and sets default
16-
#savefig('figimage_demo')
16+
savefig('figimage_demo')
1717

1818
show()
1919

lib/matplotlib/image.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from matplotlib._image import *
2424

2525
class AxesImage(martist.Artist, cm.ScalarMappable):
26+
zorder = 1
2627

2728
def __init__(self, ax,
2829
cmap = None,
@@ -517,18 +518,21 @@ def set_alpha(self, alpha):
517518
self.update_dict['array'] = True
518519

519520
class FigureImage(martist.Artist, cm.ScalarMappable):
521+
zorder = 1
520522
def __init__(self, fig,
521523
cmap = None,
522524
norm = None,
523525
offsetx = 0,
524526
offsety = 0,
525527
origin=None,
528+
**kwargs
526529
):
527530

528531
"""
529532
cmap is a colors.Colormap instance
530533
norm is a colors.Normalize instance to map luminance to 0-1
531534
535+
kwargs are an optional list of Artist keyword args
532536
"""
533537
martist.Artist.__init__(self)
534538
cm.ScalarMappable.__init__(self, norm, cmap)
@@ -537,6 +541,7 @@ def __init__(self, fig,
537541
self.figure = fig
538542
self.ox = offsetx
539543
self.oy = offsety
544+
self.update(kwargs)
540545

541546
def contains(self, mouseevent):
542547
"""Test whether the mouse event occured within the image.

0 commit comments

Comments
 (0)