Tick sets collect information on where to place ticks. Borders and grid lines use tick sets to mark points of interest in or alongside a plot.
The primary elements of a tick set are:
- A collection of tick positions on where to place ticks, in data units.
- A scale used to transform the tick positions into coordinates on the canvas.
- A labeled marker used to render the tick mark on the canvas.
Tick sets may be created using the new_tickset_from_tuples (which takes arbitrary tick data) and new_tickset_from_spec (which computes tick data from a column of data and a string specification of relative positions in the data) methods of the Toolbox object. (See the documentation for the new_tickset_from_spec method for a description of tick specification syntax.)
The default tick set is suitable to use with a scale that returns a single value in a range between 0 and 1. If you wish to use a range scale with a tick set, use the ranged tick set.
Regulates the display of tick marks. The default tick set should not be used with a range scale. Positions in this tickset are single numbers representing positions on the scale.
Tick sets are iterable objects. The result of iterating over a tick set tickset is the equivalent of calling itertools.izip(tickset.iter_tick_positions(), tickset_iter_tick_labels()).
Returns an iterator over the positions of ticks in this tick set. Positions will be returned in the same order as the labels in the iter_tick_labels method.
Returns an iterator over the tick labels in this tick set. Labels will be returned in the same order as the positions in the iter_tick_positions method.
Returns the scale associated with this tick set.
Regulates the display of tick marks within a range. The default tick set should not be used with a range scale. Positions in this tickset are pairs of numbers representing the beginning and end of the range on the scale.
Ranged tick sets are iterable objects. The result of iterating over a tick set tickset is the equivalent of calling itertools.izip(tickset.iter_tick_positions(), tickset_iter_tick_labels()).
Returns an iterator over the positions of ticks in this tick set. Positions will be returned in the same order as the labels in the iter_tick_labels method.
Returns an iterator over the tick labels in this tick set. Labels will be returned in the same order as the positions in the iter_tick_positions method.