@@ -202,7 +202,9 @@ class Formatter(TickHelper):
202202 """
203203 # some classes want to see all the locs to help format
204204 # individual ones
205- locs = []
205+ _locs = []
206+
207+ locs = _api .deprecate_privatize_attribute ("3.11" )
206208
207209 def __call__ (self , x , pos = None ):
208210 """
@@ -250,7 +252,7 @@ def set_locs(self, locs):
250252 This method is called before computing the tick labels because some
251253 formatters need to know all tick locations to do so.
252254 """
253- self .locs = locs
255+ self ._locs = locs
254256
255257 @staticmethod
256258 def fix_minus (s ):
@@ -458,15 +460,18 @@ class ScalarFormatter(Formatter):
458460
459461 """
460462
463+ orderOfMagniture = _api .deprecate_privatize_attribute ("3.11" )
464+ format = _api .deprecate_privatize_attribute ("3.11" )
465+
461466 def __init__ (self , useOffset = None , useMathText = None , useLocale = None , * ,
462467 usetex = None ):
463468 useOffset = mpl ._val_or_rc (useOffset , 'axes.formatter.useoffset' )
464469 self ._offset_threshold = mpl .rcParams ['axes.formatter.offset_threshold' ]
465470 self .set_useOffset (useOffset )
466471 self .set_usetex (usetex )
467472 self .set_useMathText (useMathText )
468- self .orderOfMagnitude = 0
469- self .format = ''
473+ self ._orderOfMagnitude = 0
474+ self ._format = ''
470475 self ._scientific = True
471476 self ._powerlimits = mpl .rcParams ['axes.formatter.limits' ]
472477 self .set_useLocale (useLocale )
@@ -1446,7 +1451,7 @@ def __call__(self, x, pos=None):
14461451 xp = (x - self .offset ) / (10. ** self .orderOfMagnitude )
14471452 if abs (xp ) < 1e-8 :
14481453 xp = 0
1449- return self ._format_maybe_minus_and_locale (self .format , xp )
1454+ return self ._format_maybe_minus_and_locale (self ._format , xp )
14501455
14511456 def set_locs (self , locs ):
14521457 # docstring inherited
0 commit comments