@@ -269,7 +269,7 @@ def __call__(self, *args, data=None, **kwargs):
269269 label_namer_idx = 1
270270 else :
271271 if replaced [1 ] is not args [1 ]: # case 2a)
272- cbook . _warn_external (
272+ _api . warn_external (
273273 f"Second argument { args [1 ]!r} is ambiguous: could "
274274 f"be a format string but is in 'data'; using as "
275275 f"data. If it was intended as data, set the "
@@ -2457,7 +2457,7 @@ def margins(self, *margins, x=None, y=None, tight=True):
24572457
24582458 if x is None and y is None :
24592459 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' )
24612461 return self ._xmargin , self ._ymargin
24622462
24632463 if tight is not None :
@@ -3443,19 +3443,19 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False,
34433443 # so only grab the limits if we really need them.
34443444 old_left , old_right = self .get_xlim ()
34453445 if left <= 0 :
3446- cbook . _warn_external (
3446+ _api . warn_external (
34473447 'Attempted to set non-positive left xlim on a '
34483448 'log-scaled axis.\n '
34493449 'Invalid limit will be ignored.' )
34503450 left = old_left
34513451 if right <= 0 :
3452- cbook . _warn_external (
3452+ _api . warn_external (
34533453 'Attempted to set non-positive right xlim on a '
34543454 'log-scaled axis.\n '
34553455 'Invalid limit will be ignored.' )
34563456 right = old_right
34573457 if left == right :
3458- cbook . _warn_external (
3458+ _api . warn_external (
34593459 f"Attempting to set identical left == right == { left } results "
34603460 f"in singular transformations; automatically expanding." )
34613461 reverse = left > right
@@ -3769,19 +3769,19 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
37693769 # so only grab the limits if we really need them.
37703770 old_bottom , old_top = self .get_ylim ()
37713771 if bottom <= 0 :
3772- cbook . _warn_external (
3772+ _api . warn_external (
37733773 'Attempted to set non-positive bottom ylim on a '
37743774 'log-scaled axis.\n '
37753775 'Invalid limit will be ignored.' )
37763776 bottom = old_bottom
37773777 if top <= 0 :
3778- cbook . _warn_external (
3778+ _api . warn_external (
37793779 'Attempted to set non-positive top ylim on a '
37803780 'log-scaled axis.\n '
37813781 'Invalid limit will be ignored.' )
37823782 top = old_top
37833783 if bottom == top :
3784- cbook . _warn_external (
3784+ _api . warn_external (
37853785 f"Attempting to set identical bottom == top == { bottom } "
37863786 f"results in singular transformations; automatically "
37873787 f"expanding." )
@@ -4068,7 +4068,7 @@ def _set_view_from_bbox(self, bbox, direction='in',
40684068 xzc + xwidth / 2. / scl , yzc + ywidth / 2. / scl ]
40694069 elif len (bbox ) != 4 :
40704070 # should be len 3 or 4 but nothing else
4071- cbook . _warn_external (
4071+ _api . warn_external (
40724072 "Warning in _set_view_from_bbox: bounding box is not a tuple "
40734073 "of length 3 or 4. Ignoring the view change." )
40744074 return
@@ -4212,7 +4212,7 @@ def format_deltas(key, dx, dy):
42124212 result = (mtransforms .Bbox (newpoints )
42134213 .transformed (p .trans_inverse ))
42144214 except OverflowError :
4215- cbook . _warn_external ('Overflow while panning' )
4215+ _api . warn_external ('Overflow while panning' )
42164216 return
42174217 else :
42184218 return
0 commit comments