Inherits from
- AbstractScale: enthought.chaco.scales.scales.AbstractScale
Attributes
- CALENDAR_UNITS
CALENDAR_UNITS = ('day_of_month', 'month_of_year') - SECS_PER_UNIT
This is used to compute an approximate resolution for each type of scale.
SECS_PER_UNIT = { Const('microseconds') : Const(9.9999999999999995e-007), Const('milliseconds') : Const(0.001), Const('seconds') : Const(1), Const('minutes') : Const(60), Const('hours') : Const(3600), Const('days') : Mul((Const(24), Const(3600))), Const('day_of_month') : Mul((Mul((Const(30), Const(24))), Const(3600))), Const('month_of_year') : Mul((Mul((Const(365), Const(24))), Const(3600))) }
Method summary
- __init__(self, **kw_interval)
- cal_ticks(self, start, end)
- label_width(self, start, end, numlabels = None, char_width = None)
- labels(self, start, end, numlabels = None, char_width = None)
- num_ticks(self, start, end, desired_ticks = None)
- ticks(self, start, end, desired_ticks = None)
Methods
- __init__(self, **kw_interval)
Defines the time period that this scale uses.
- cal_ticks(self, start, end)
ticks() method for calendar-based intervals
- label_width(self, start, end, numlabels = None, char_width = None)
Returns an estimate of total number of characters used by the the labels that this scale will produce for the given set of inputs, as well as the number of labels.
Overrides AbstractScale.
- labels(self, start, end, numlabels = None, char_width = None)
Returns a series of ticks and corresponding strings for labels that fall inside the interval (start,*end*).
Overrides AbstractScale.
- num_ticks(self, start, end, desired_ticks = None)
Returns an approximate number of ticks that this scale produces for the given interval.
Implements AbstractScale.
- ticks(self, start, end, desired_ticks = None)
Returns the set of "nice" positions on this scale that enclose and fall inside the interval (start,*end*).
Implements AbstractScale. The start and end parameters are floating-point seconds since the epoch.