@@ -269,7 +269,7 @@ def __call__(self, *args, data=None, **kwargs):
269
269
label_namer_idx = 1
270
270
else :
271
271
if replaced [1 ] is not args [1 ]: # case 2a)
272
- cbook . _warn_external (
272
+ _api . warn_external (
273
273
f"Second argument { args [1 ]!r} is ambiguous: could "
274
274
f"be a format string but is in 'data'; using as "
275
275
f"data. If it was intended as data, set the "
@@ -2457,7 +2457,7 @@ def margins(self, *margins, x=None, y=None, tight=True):
2457
2457
2458
2458
if x is None and y is None :
2459
2459
if tight is not True :
2460
- cbook . _warn_external (f'ignoring tight={ tight !r} in get mode' )
2460
+ _api . warn_external (f'ignoring tight={ tight !r} in get mode' )
2461
2461
return self ._xmargin , self ._ymargin
2462
2462
2463
2463
if tight is not None :
@@ -3443,19 +3443,19 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False,
3443
3443
# so only grab the limits if we really need them.
3444
3444
old_left , old_right = self .get_xlim ()
3445
3445
if left <= 0 :
3446
- cbook . _warn_external (
3446
+ _api . warn_external (
3447
3447
'Attempted to set non-positive left xlim on a '
3448
3448
'log-scaled axis.\n '
3449
3449
'Invalid limit will be ignored.' )
3450
3450
left = old_left
3451
3451
if right <= 0 :
3452
- cbook . _warn_external (
3452
+ _api . warn_external (
3453
3453
'Attempted to set non-positive right xlim on a '
3454
3454
'log-scaled axis.\n '
3455
3455
'Invalid limit will be ignored.' )
3456
3456
right = old_right
3457
3457
if left == right :
3458
- cbook . _warn_external (
3458
+ _api . warn_external (
3459
3459
f"Attempting to set identical left == right == { left } results "
3460
3460
f"in singular transformations; automatically expanding." )
3461
3461
reverse = left > right
@@ -3769,19 +3769,19 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
3769
3769
# so only grab the limits if we really need them.
3770
3770
old_bottom , old_top = self .get_ylim ()
3771
3771
if bottom <= 0 :
3772
- cbook . _warn_external (
3772
+ _api . warn_external (
3773
3773
'Attempted to set non-positive bottom ylim on a '
3774
3774
'log-scaled axis.\n '
3775
3775
'Invalid limit will be ignored.' )
3776
3776
bottom = old_bottom
3777
3777
if top <= 0 :
3778
- cbook . _warn_external (
3778
+ _api . warn_external (
3779
3779
'Attempted to set non-positive top ylim on a '
3780
3780
'log-scaled axis.\n '
3781
3781
'Invalid limit will be ignored.' )
3782
3782
top = old_top
3783
3783
if bottom == top :
3784
- cbook . _warn_external (
3784
+ _api . warn_external (
3785
3785
f"Attempting to set identical bottom == top == { bottom } "
3786
3786
f"results in singular transformations; automatically "
3787
3787
f"expanding." )
@@ -4068,7 +4068,7 @@ def _set_view_from_bbox(self, bbox, direction='in',
4068
4068
xzc + xwidth / 2. / scl , yzc + ywidth / 2. / scl ]
4069
4069
elif len (bbox ) != 4 :
4070
4070
# should be len 3 or 4 but nothing else
4071
- cbook . _warn_external (
4071
+ _api . warn_external (
4072
4072
"Warning in _set_view_from_bbox: bounding box is not a tuple "
4073
4073
"of length 3 or 4. Ignoring the view change." )
4074
4074
return
@@ -4212,7 +4212,7 @@ def format_deltas(key, dx, dy):
4212
4212
result = (mtransforms .Bbox (newpoints )
4213
4213
.transformed (p .trans_inverse ))
4214
4214
except OverflowError :
4215
- cbook . _warn_external ('Overflow while panning' )
4215
+ _api . warn_external ('Overflow while panning' )
4216
4216
return
4217
4217
else :
4218
4218
return
0 commit comments