@@ -217,6 +217,8 @@ def _rgb_to_rgba(A):
217
217
218
218
class _ImageBase (martist .Artist , cm .ScalarMappable ):
219
219
"""
220
+ Base class for images.
221
+
220
222
interpolation and cmap default to their rc settings
221
223
222
224
cmap is a colors.Colormap instance
@@ -227,7 +229,6 @@ class _ImageBase(martist.Artist, cm.ScalarMappable):
227
229
centers with the zero-based row and column indices.
228
230
229
231
Additional kwargs are matplotlib.artist properties
230
-
231
232
"""
232
233
zorder = 0
233
234
@@ -264,7 +265,7 @@ def __getstate__(self):
264
265
return state
265
266
266
267
def get_size (self ):
267
- """Get the numrows, numcols of the input image"""
268
+ """Return the size of the image as tuple (numrows, numcols). """
268
269
if self ._A is None :
269
270
raise RuntimeError ('You must first set the image array' )
270
271
@@ -823,44 +824,42 @@ class AxesImage(_ImageBase):
823
824
"""
824
825
Parameters
825
826
----------
826
- cmap : colors.Colormap
827
+ ax : `~.axes.Axes`
828
+ The axes the image will belong to.
829
+ cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
827
830
The Colormap instance or registered colormap name used to map scalar
828
831
data to colors.
829
- norm : colors.Normalize
832
+ norm : `~matplotlib. colors.Normalize`
830
833
Maps luminance to 0-1.
831
- interpolation : str
834
+ interpolation : str, default: :rc:`image.interpolation`
832
835
Supported values are 'none', 'antialiased', 'nearest', 'bilinear',
833
836
'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite',
834
837
'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell',
835
838
'sinc', 'lanczos'.
836
- origin : {'upper', 'lower'}
839
+ origin : {'upper', 'lower'}, default: :rc:`image.origin`
837
840
Place the [0, 0] index of the array in the upper left or lower left
838
841
corner of the axes. The convention 'upper' is typically used for
839
842
matrices and images.
840
- extent : tuple
843
+ extent : tuple, optional
841
844
The data axes (left, right, bottom, top) for making image plots
842
845
registered with data plots. Default is to label the pixel
843
846
centers with the zero-based row and column indices.
844
- filternorm : bool
847
+ filternorm : bool, default: True
845
848
A parameter for the antigrain image resize filter
846
849
(see the antigrain documentation).
847
850
If filternorm is set, the filter normalizes integer values and corrects
848
851
the rounding errors. It doesn't do anything with the source floating
849
852
point values, it corrects only integers according to the rule of 1.0
850
853
which means that any sum of pixel weights must be equal to 1.0. So,
851
854
the filter function must produce a graph of the proper shape.
852
- filterrad : float > 0
855
+ filterrad : float > 0, default: 4
853
856
The filter radius for filters that have a radius parameter, i.e. when
854
857
interpolation is one of: 'sinc', 'lanczos' or 'blackman'.
855
- resample : bool
858
+ resample : bool, default: False
856
859
When True, use a full resampling method. When False, only resample when
857
860
the output image is larger than the input image.
858
- **kwargs
859
- Additional kwargs are matplotlib.artist properties.
861
+ **kwargs : `.Artist` properties
860
862
861
- Notes
862
- -----
863
- interpolation and cmap default to their rc settings
864
863
"""
865
864
def __str__ (self ):
866
865
return "AxesImage(%g,%g;%gx%g)" % tuple (self .axes .bbox .bounds )
@@ -927,9 +926,9 @@ def set_extent(self, extent):
927
926
928
927
Notes
929
928
-----
930
- This updates ``ax.dataLim`, and, if autoscaling, sets ``ax.viewLim``
929
+ This updates ``ax.dataLim`` , and, if autoscaling, sets ``ax.viewLim``
931
930
to tightly fit the image, regardless of ``dataLim``. Autoscaling
932
- state is not changed, so following this with ax.autoscale_view
931
+ state is not changed, so following this with `` ax.autoscale_view()``
933
932
will redo the autoscaling in accord with ``dataLim``.
934
933
"""
935
934
self ._extent = xmin , xmax , ymin , ymax = extent
0 commit comments