SimpleFormatter
- class SimpleFormatter(precision=None, zerotrim=None, tickrange=None, wraprange=None, prefix=None, suffix=None, negpos=None)[source]
Bases:
FormatterA general purpose number formatter. This is similar to
AutoFormatterbut suitable for arbitrary formatting not necessarily associated with anAxisinstance.- Parameters:
precision (
int, default:{6, 2}) – The maximum number of digits after the decimal point. Default is6whenzerotrimisTrueand2otherwise.zerotrim (
bool, default:rc['formatter.zerotrim']=True) – Whether to trim trailing decimal zeros.tickrange (
2-tupleoffloat, optional) – Range within which major tick marks are labeled. All ticks are labeled by default.wraprange (
2-tupleoffloat, optional) – Range outside of which tick values are wrapped. For example,(-180, 180)will format a value of200as-160.prefix, suffix (
str, optional) – Prefix and suffix for all tick strings. The suffix is added before the optionalnegpossuffix.negpos (
str, optional) – Length-2 string indicating the suffix for “negative” and “positive” numbers, meant to replace the minus sign.
Methods Summary
__call__(x[, pos])Convert number to a string.
Methods Documentation