Return a Formatter
instance.
formatter (Formatter
, str
, bool
, callable()
, or sequence) – The formatter specification, interpreted as follows:
If a
Formatter
instance already, acopy.copy
of the instance is returned.If
False
, aNullFormatter
is used, and ifTrue
, the defaultAutoFormatter
is used.If a function, the labels will be generated using this function. Returns a
FuncFormatter
.If sequence of strings, the ticks are labeled with these strings. Returns a
FixedFormatter
by default or anIndexFormatter
ifindex
isTrue
.If a string containing
{x}
or{x:...}
, ticks will be formatted by callingstring.format(x=number)
. Returns aStrMethodFormatter
.If a string containing
'%'
anddate
isFalse
, ticks will be formatted using the C-stylestring % number
method. See this page for a review. Returns aFormatStrFormatter
.If a string containing
'%'
anddate
isTrue
, ticks will be formatted usingstrfrtime
. See this page for a review. Returns aDateFormatter
.Otherwise,
formatter
should be a string corresponding to one of the “registered” formatters or formatter presets (see below table). Ifformatter
is a list or tuple and the first element is a “registered” formatter name, subsequent elements are passed to the formatter class as positional arguments. For example,pplt.Formatter(('sigfig', 3))
is equivalent toFormatter('sigfig', 3)
.
Toggles the behavior when formatter
contains a '%'
sign (see above).
Controls the behavior when formatter
is a sequence of strings (see above).
*args, **kwargs – Passed to the Formatter
class.
matplotlib.ticker.Formatter
– A Formatter
instance.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4