Attributes
- format_order
Labels of time units, from finest to coarsest.
format_order = [ 'microseconds', 'milliseconds', 'seconds', 'minsec', 'minutes', 'hourmin', 'hours', 'days', 'months', 'years' ]
- formats
A dict whose are keys are the strings in format_order; each value is two arrays, (widths, format strings).
formats = { } - strip_leading_zeros
Whether or not to strip the leading zeros on tick labels.
strip_leading_zeros = True
Method summary
- __init__(self, **kwds)
- estimate_width(self, start, end, numlabels = None, char_width = None, fill_ratio = 0.20000000000000001, ticker = None)
- format(self, ticks, numlabels = None, char_width = None, fill_ratio = 0.29999999999999999, ticker = None)
Methods
- __init__(self, **kwds)
- estimate_width(self, start, end, numlabels = None, char_width = None, fill_ratio = 0.20000000000000001, 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, ticker = None)
Formats a set of time values.
Parameters
- ticks : array of numbers
- The tick values to be formatted
- numlabels
- Not used.
- 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
List of formatted labels.