Revision: 4388
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4388&view=rev
Author: mdboom
Date: 2007-11-20 05:14:34 -0800 (Tue, 20 Nov 2007)
Log Message:
-----------
Reverting imshow -- these issues are being dealt with by Eric Firing
on the trunk.
Modified Paths:
--------------
branches/transforms/lib/matplotlib/axes.py
Modified: branches/transforms/lib/matplotlib/axes.py
===================================================================
--- branches/transforms/lib/matplotlib/axes.py 2007-11-20 13:13:22 UTC (rev
4387)
+++ branches/transforms/lib/matplotlib/axes.py 2007-11-20 13:14:34 UTC (rev
4388)
@@ -4386,9 +4386,7 @@
#### plotting z(x,y): imshow, pcolor and relatives, contour
- def imshow(self, I,
- X = None,
- Y = None,
+ def imshow(self, X,
cmap = None,
norm = None,
aspect=None,
@@ -4405,24 +4403,18 @@
**kwargs):
"""
- IMSHOW(I, X=None, Y=None, cmap=None, norm=None, aspect=None,
- interpolation=None, alpha=1.0, vmin=None, vmax=None,
- origin=None, extent=None)
+ IMSHOW(X, cmap=None, norm=None, aspect=None, interpolation=None,
+ alpha=1.0, vmin=None, vmax=None, origin=None, extent=None)
- IMSHOW(I) - plot image I to current axes, resampling to scale to axes
- size (I may be numpy array or PIL image)
+ IMSHOW(X) - plot image X to current axes, resampling to scale to axes
+ size (X may be numarray/Numeric array or PIL image)
- IMSHOW(I, X, Y) - plot image I to current axes, with
- nonuniform X and Y axes. (I, X and Y may be
- numarray/Numeric array or PIL image)
-
- IMSHOW(I, X, Y, **kwargs) - Use keyword args to control image
- scaling, colormapping etc. See
- below for details
+ IMSHOW(X, **kwargs) - Use keyword args to control image scaling,
+ colormapping etc. See below for details
- Display the image in I to current axes. I may be a float array, a
- uint8 array or a PIL image. If I is an array, I can have the following
+ Display the image in X to current axes. X may be a float array, a
+ uint8 array or a PIL image. If X is an array, X can have the following
shapes:
MxN : luminance (grayscale, float array only)
@@ -4434,10 +4426,6 @@
The value for each component of MxNx3 and MxNx4 float arrays should be
in the range 0.0 to 1.0; MxN float arrays may be normalised.
- X and/or Y may be provided to specify a non-uniform image
- grid. Each element of the X or Y arrays is the width or height
- of the corresponding pixel in the given image.
-
A image.AxesImage instance is returned
The following kwargs are allowed:
@@ -4502,24 +4490,11 @@
if cmap is not None: assert(isinstance(cmap, mcolors.Colormap))
if aspect is None: aspect = rcParams['image.aspect']
self.set_aspect(aspect)
-
- if X is None and Y is None:
- im = mimage.AxesImage(self, cmap, norm, interpolation, origin,
extent,
- filternorm=filternorm,
- filterrad=filterrad, **kwargs)
-
- im.set_data(I)
- else:
- if X is None:
- X = npy.arange(I.shape[1])
- if Y is None:
- Y = npy.arange(I.shape[0])
- im = mimage.NonUniformImage(self, cmap=cmap, norm=norm,
- interpolation=interpolation,
- origin=origin, extent=extent,
- filternorm=filternorm,
- filterrad=filterrad, **kwargs)
- im.set_data(X, Y, I)
+ im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent,
+ filternorm=filternorm,
+ filterrad=filterrad, **kwargs)
+
+ im.set_data(X)
im.set_alpha(alpha)
self._set_artist_props(im)
im.set_clip_path(self.axesPatch)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins