@@ -5392,9 +5392,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
5392
5392
#### plotting z(x, y): imshow, pcolor and relatives, contour
5393
5393
@_preprocess_data ()
5394
5394
def imshow (self , X , cmap = None , norm = None , aspect = None ,
5395
- interpolation = None , alpha = None , vmin = None , vmax = None ,
5396
- origin = None , extent = None , * , filternorm = True , filterrad = 4.0 ,
5397
- resample = None , url = None , ** kwargs ):
5395
+ interpolation = None , interp_postrgba = False , alpha = None ,
5396
+ vmin = None , vmax = None , origin = None , extent = None , * ,
5397
+ filternorm = True , filterrad = 4.0 , resample = None , url = None ,
5398
+ ** kwargs ):
5398
5399
"""
5399
5400
Display data as an image, i.e., on a 2D regular raster.
5400
5401
@@ -5485,6 +5486,14 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5485
5486
which can be set by *filterrad*. Additionally, the antigrain image
5486
5487
resize filter is controlled by the parameter *filternorm*.
5487
5488
5489
+ interp_postrgba : bool, default: False
5490
+ Whether the interpolation above is carried out before or after
5491
+ the image data has been passed through the *norm* and colormapping.
5492
+ This will cause the interpolation to take place in colorspace
5493
+ rather than dataspace, which can be better for visual
5494
+ anti-aliasing. Note that this is ignored if *X* is passed in as
5495
+ RGB(A).
5496
+
5488
5497
alpha : float or array-like, optional
5489
5498
The alpha blending value, between 0 (transparent) and 1 (opaque).
5490
5499
If *alpha* is an array, the alpha blending values are applied pixel
@@ -5582,9 +5591,9 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5582
5591
if aspect is None :
5583
5592
aspect = rcParams ['image.aspect' ]
5584
5593
self .set_aspect (aspect )
5585
- im = mimage .AxesImage (self , cmap , norm , interpolation , origin , extent ,
5586
- filternorm = filternorm , filterrad = filterrad ,
5587
- resample = resample , ** kwargs )
5594
+ im = mimage .AxesImage (self , cmap , norm , interpolation , interp_postrgba ,
5595
+ origin , extent , filternorm = filternorm ,
5596
+ filterrad = filterrad , resample = resample , ** kwargs )
5588
5597
5589
5598
im .set_data (X )
5590
5599
im .set_alpha (alpha )
0 commit comments