@@ -369,7 +369,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
369
369
370
370
return output , clipped_bbox .x0 , clipped_bbox .y0 , t
371
371
372
- def make_image (self , renderer , magnification = 1.0 ):
372
+ def make_image (self , renderer , magnification = 1.0 , unsampled = False ):
373
373
raise RuntimeError ('The make_image method must be overridden.' )
374
374
375
375
def _draw_unsampled_image (self , renderer , gc ):
@@ -715,10 +715,13 @@ def _check_unsampled_image(self, renderer):
715
715
"""
716
716
return False
717
717
718
- def make_image (self , renderer , magnification = 1.0 ):
718
+ def make_image (self , renderer , magnification = 1.0 , unsampled = False ):
719
719
if self ._A is None :
720
720
raise RuntimeError ('You must first set the image array' )
721
721
722
+ if unsampled :
723
+ raise ValueError ('unsampled not supported on NonUniformImage' )
724
+
722
725
A = self ._A
723
726
if A .ndim == 2 :
724
727
if A .dtype != np .uint8 :
@@ -847,9 +850,11 @@ def __init__(self, ax,
847
850
self .update (kwargs )
848
851
self .set_data (x , y , A )
849
852
850
- def make_image (self , renderer , magnification = 1.0 ):
853
+ def make_image (self , renderer , magnification = 1.0 , unsampled = False ):
851
854
if self ._A is None :
852
855
raise RuntimeError ('You must first set the image array' )
856
+ if unsampled :
857
+ raise ValueError ('unsampled not supported on PColorImage' )
853
858
fc = self .axes .patch .get_facecolor ()
854
859
bg = mcolors .colorConverter .to_rgba (fc , 0 )
855
860
bg = (np .array (bg )* 255 ).astype (np .uint8 )
0 commit comments