@@ -3225,16 +3225,16 @@ def scatter(self, *args, **kwargs):
3225
3225
"""
3226
3226
ax , plt = self ._ax_plt_from_kw (kwargs )
3227
3227
# allow callers to override the hold state by passing hold=True|False
3228
- b = ax .ishold ()
3228
+ b = ax ._hold
3229
3229
h = kwargs .pop ('hold' ,None )
3230
3230
if h is not None :
3231
- ax .hold ( h )
3231
+ ax ._hold = h
3232
3232
try :
3233
3233
ret = ax .scatter (* args , ** kwargs )
3234
3234
except :
3235
- ax .hold ( b )
3235
+ ax ._hold = b
3236
3236
raise
3237
- ax .hold ( b )
3237
+ ax ._hold = b
3238
3238
# reset current active image (only if pyplot is imported).
3239
3239
if plt :
3240
3240
plt .sci (ret )
@@ -3263,16 +3263,16 @@ def plot(self, *args, **kwargs):
3263
3263
"""
3264
3264
ax = kwargs .pop ('ax' , None ) or self ._check_ax ()
3265
3265
# allow callers to override the hold state by passing hold=True|False
3266
- b = ax .ishold ()
3266
+ b = ax ._hold
3267
3267
h = kwargs .pop ('hold' ,None )
3268
3268
if h is not None :
3269
- ax .hold ( h )
3269
+ ax ._hold = h
3270
3270
try :
3271
3271
ret = ax .plot (* args , ** kwargs )
3272
3272
except :
3273
- ax .hold ( b )
3273
+ ax ._hold = b
3274
3274
raise
3275
- ax .hold ( b )
3275
+ ax ._hold = b
3276
3276
# set axes limits to fit map region.
3277
3277
self .set_axes_limits (ax = ax )
3278
3278
# clip to map limbs
@@ -3299,16 +3299,16 @@ def imshow(self, *args, **kwargs):
3299
3299
if 'origin' not in kwargs :
3300
3300
kwargs ['origin' ]= 'lower'
3301
3301
# allow callers to override the hold state by passing hold=True|False
3302
- b = ax .ishold ()
3302
+ b = ax ._hold
3303
3303
h = kwargs .pop ('hold' ,None )
3304
3304
if h is not None :
3305
- ax .hold ( h )
3305
+ ax ._hold = h
3306
3306
try :
3307
3307
ret = ax .imshow (* args , ** kwargs )
3308
3308
except :
3309
- ax .hold ( b )
3309
+ ax ._hold = b
3310
3310
raise
3311
- ax .hold ( b )
3311
+ ax ._hold = b
3312
3312
# reset current active image (only if pyplot is imported).
3313
3313
if plt :
3314
3314
plt .sci (ret )
@@ -3349,10 +3349,10 @@ def pcolor(self,x,y,data,**kwargs):
3349
3349
"""
3350
3350
ax , plt = self ._ax_plt_from_kw (kwargs )
3351
3351
# allow callers to override the hold state by passing hold=True|False
3352
- b = ax .ishold ()
3352
+ b = ax ._hold
3353
3353
h = kwargs .pop ('hold' ,None )
3354
3354
if h is not None :
3355
- ax .hold ( h )
3355
+ ax ._hold = h
3356
3356
try :
3357
3357
if kwargs .pop ('tri' , False ):
3358
3358
try :
@@ -3386,9 +3386,9 @@ def pcolor(self,x,y,data,**kwargs):
3386
3386
y = ma .masked_values (np .where (y > 1.e20 ,1.e20 ,y ), 1.e20 )
3387
3387
ret = ax .pcolor (x ,y ,data ,** kwargs )
3388
3388
except :
3389
- ax .hold ( b )
3389
+ ax ._hold = b
3390
3390
raise
3391
- ax .hold ( b )
3391
+ ax ._hold = b
3392
3392
# reset current active image (only if pyplot is imported).
3393
3393
if plt :
3394
3394
plt .sci (ret )
@@ -3424,16 +3424,16 @@ def pcolormesh(self,x,y,data,**kwargs):
3424
3424
"""
3425
3425
ax , plt = self ._ax_plt_from_kw (kwargs )
3426
3426
# allow callers to override the hold state by passing hold=True|False
3427
- b = ax .ishold ()
3427
+ b = ax ._hold
3428
3428
h = kwargs .pop ('hold' ,None )
3429
3429
if h is not None :
3430
- ax .hold ( h )
3430
+ ax ._hold = h
3431
3431
try :
3432
3432
ret = ax .pcolormesh (x ,y ,data ,** kwargs )
3433
3433
except :
3434
- ax .hold ( b )
3434
+ ax ._hold = b
3435
3435
raise
3436
- ax .hold ( b )
3436
+ ax ._hold = b
3437
3437
# reset current active image (only if pyplot is imported).
3438
3438
if plt :
3439
3439
plt .sci (ret )
@@ -3470,20 +3470,20 @@ def hexbin(self,x,y,**kwargs):
3470
3470
"""
3471
3471
ax , plt = self ._ax_plt_from_kw (kwargs )
3472
3472
# allow callers to override the hold state by passing hold=True|False
3473
- b = ax .ishold ()
3473
+ b = ax ._hold
3474
3474
h = kwargs .pop ('hold' ,None )
3475
3475
if h is not None :
3476
- ax .hold ( h )
3476
+ ax ._hold = h
3477
3477
try :
3478
3478
# make x,y masked arrays
3479
3479
# (masked where data is outside of projection limb)
3480
3480
x = ma .masked_values (np .where (x > 1.e20 ,1.e20 ,x ), 1.e20 )
3481
3481
y = ma .masked_values (np .where (y > 1.e20 ,1.e20 ,y ), 1.e20 )
3482
3482
ret = ax .hexbin (x ,y ,** kwargs )
3483
3483
except :
3484
- ax .hold ( b )
3484
+ ax ._hold = b
3485
3485
raise
3486
- ax .hold ( b )
3486
+ ax ._hold = b
3487
3487
# reset current active image (only if pyplot is imported).
3488
3488
if plt :
3489
3489
plt .sci (ret )
@@ -3516,10 +3516,10 @@ def contour(self,x,y,data,*args,**kwargs):
3516
3516
"""
3517
3517
ax , plt = self ._ax_plt_from_kw (kwargs )
3518
3518
# allow callers to override the hold state by passing hold=True|False
3519
- b = ax .ishold ()
3519
+ b = ax ._hold
3520
3520
h = kwargs .pop ('hold' ,None )
3521
3521
if h is not None :
3522
- ax .hold ( h )
3522
+ ax ._hold = h
3523
3523
try :
3524
3524
if kwargs .pop ('tri' , False ):
3525
3525
try :
@@ -3581,9 +3581,9 @@ def contour(self,x,y,data,*args,**kwargs):
3581
3581
data = ma .masked_array (data ,mask = mask )
3582
3582
CS = ax .contour (x ,y ,data ,* args ,** kwargs )
3583
3583
except :
3584
- ax .hold ( b )
3584
+ ax ._hold = b
3585
3585
raise
3586
- ax .hold ( b )
3586
+ ax ._hold = b
3587
3587
# reset current active image (only if pyplot is imported).
3588
3588
if plt and CS .get_array () is not None :
3589
3589
plt .sci (CS )
@@ -3619,10 +3619,10 @@ def contourf(self,x,y,data,*args,**kwargs):
3619
3619
"""
3620
3620
ax , plt = self ._ax_plt_from_kw (kwargs )
3621
3621
# allow callers to override the hold state by passing hold=True|False
3622
- b = ax .ishold ()
3622
+ b = ax ._hold
3623
3623
h = kwargs .pop ('hold' ,None )
3624
3624
if h is not None :
3625
- ax .hold ( h )
3625
+ ax ._hold = h
3626
3626
try :
3627
3627
if kwargs .get ('tri' , False ):
3628
3628
try :
@@ -3686,9 +3686,9 @@ def contourf(self,x,y,data,*args,**kwargs):
3686
3686
data = ma .masked_array (data ,mask = mask )
3687
3687
CS = ax .contourf (x ,y ,data ,* args ,** kwargs )
3688
3688
except :
3689
- ax .hold ( b )
3689
+ ax ._hold = b
3690
3690
raise
3691
- ax .hold ( b )
3691
+ ax ._hold = b
3692
3692
# reset current active image (only if pyplot is imported).
3693
3693
if plt and CS .get_array () is not None :
3694
3694
plt .sci (CS )
@@ -3718,16 +3718,16 @@ def quiver(self, x, y, u, v, *args, **kwargs):
3718
3718
"""
3719
3719
ax , plt = self ._ax_plt_from_kw (kwargs )
3720
3720
# allow callers to override the hold state by passing hold=True|False
3721
- b = ax .ishold ()
3721
+ b = ax ._hold
3722
3722
h = kwargs .pop ('hold' ,None )
3723
3723
if h is not None :
3724
- ax .hold ( h )
3724
+ ax ._hold = h
3725
3725
try :
3726
3726
ret = ax .quiver (x ,y ,u ,v ,* args ,** kwargs )
3727
3727
except :
3728
- ax .hold ( b )
3728
+ ax ._hold = b
3729
3729
raise
3730
- ax .hold ( b )
3730
+ ax ._hold = b
3731
3731
if plt is not None and ret .get_array () is not None :
3732
3732
plt .sci (ret )
3733
3733
# set axes limits to fit map region.
@@ -3760,16 +3760,16 @@ def streamplot(self, x, y, u, v, *args, **kwargs):
3760
3760
raise NotImplementedError (msg )
3761
3761
ax , plt = self ._ax_plt_from_kw (kwargs )
3762
3762
# allow callers to override the hold state by passing hold=True|False
3763
- b = ax .ishold ()
3763
+ b = ax ._hold
3764
3764
h = kwargs .pop ('hold' ,None )
3765
3765
if h is not None :
3766
- ax .hold ( h )
3766
+ ax ._hold = h
3767
3767
try :
3768
3768
ret = ax .streamplot (x ,y ,u ,v ,* args ,** kwargs )
3769
3769
except :
3770
- ax .hold ( b )
3770
+ ax ._hold = b
3771
3771
raise
3772
- ax .hold ( b )
3772
+ ax ._hold = b
3773
3773
if plt is not None and ret .lines .get_array () is not None :
3774
3774
plt .sci (ret .lines )
3775
3775
# set axes limits to fit map region.
@@ -3810,10 +3810,10 @@ def barbs(self, x, y, u, v, *args, **kwargs):
3810
3810
raise NotImplementedError (msg )
3811
3811
ax , plt = self ._ax_plt_from_kw (kwargs )
3812
3812
# allow callers to override the hold state by passing hold=True|False
3813
- b = ax .ishold ()
3813
+ b = ax ._hold
3814
3814
h = kwargs .pop ('hold' ,None )
3815
3815
if h is not None :
3816
- ax .hold ( h )
3816
+ ax ._hold = h
3817
3817
lons , lats = self (x , y , inverse = True )
3818
3818
unh = ma .masked_where (lats <= 0 , u )
3819
3819
vnh = ma .masked_where (lats <= 0 , v )
@@ -3824,9 +3824,9 @@ def barbs(self, x, y, u, v, *args, **kwargs):
3824
3824
kwargs ['flip_barb' ]= True
3825
3825
retsh = ax .barbs (x ,y ,ush ,vsh ,* args ,** kwargs )
3826
3826
except :
3827
- ax .hold ( b )
3827
+ ax ._hold = b
3828
3828
raise
3829
- ax .hold ( b )
3829
+ ax ._hold = b
3830
3830
# Because there are two collections returned in general,
3831
3831
# we can't set the current image...
3832
3832
#if plt is not None and ret.get_array() is not None:
0 commit comments