Attributes
- avg_label_width
This is a class-level default that is related to the algorithm in format()
avg_label_width = 7.0
- scientific_limits
Any number smaller than 10 ** limits[0] or larger than 10 ** limits[1] will be represented using scientific notiation.
scientific_limits = (-Const(3), 5)
- use_scientific
Toggles whether or not to use scientific notation when the values exceed scientific_limits
use_scientific = True
Method summary
- __init__(self, **kwds)
- estimate_width(self, start, end, numlabels = None, char_width = None, fill_ratio = 0.29999999999999999, ticker = None)
- format(self, ticks, numlabels = None, char_width = None, fill_ratio = 0.29999999999999999)
- oldformat(self, ticks, numlabels = None, char_width = None)
Methods
- __init__(self, **kwds)
- estimate_width(self, start, end, numlabels = None, char_width = None, fill_ratio = 0.29999999999999999, ticker = None)
Returns an estimate of the total number of characters used by the the labels for the given set of inputs, as well as the number of labels.
Parameters
- start : number
- The beginning of the interval.
- end : number
- The end of the interval.
- numlabels : number
- The ideal number of labels to generate on the interval.
- char_width : number
- The total character width available for labelling the interval.
- fill_ratio : 0.0 < float <= 1.0
- Ratio of the available width that will be occupied by label text.
- ticker : AbstractScale object
- Object that can calculate the number of labels needed.
Returns
(numlabels, total label width)
- format(self, ticks, numlabels = None, char_width = None, fill_ratio = 0.29999999999999999)
Does "nice" formatting of floating-point numbers. numlabels is ignored in this method.
- oldformat(self, ticks, numlabels = None, char_width = None)
This function is adapted from matplotlib's "OldScalarFormatter".
Parameters
- ticks : array of numbers
- The tick values to be formatted.
- numlabels
- Not used.
- char_width
- Not used.
Returns
List of formatted labels.