ExtendedWilkinsonTickLocator#

Module: exa.core.plotting.extended_wilkinson_tick_locator

class ExtendedWilkinsonTickLocator(target_density, only_inside=0, per_inch=False, Q=None, w=None)#

Bases: Locator

Places the ticks according to the extended Wilkinson algorithm.

For details see http://vis.stanford.edu/files/2010-TickLabels-InfoVis.pdf

Parameters:
  • target_density (float) – controls the number of ticks. The algorithm will try to put as many ticks on the axis but deviations are allowed if another criterion is considered more important.

  • only_inside (int) –

    controls if the first and last label include the data range.

    • 0 : doesn’t matter

    • >0 : label range must include data range

    • <0 : data range must be larger than label range

  • per_inch (bool) – if per_inch=True then it specifies the number of ticks per inch instead of a fixed number, so the actual number of ticks depends on the size of the axis

  • Q (list[float] | None) – numbers that are considered as ‘nice’. Ticks will be multiples of these

  • w (list[float] | None) – list of weights that control the importance of the four criteria: simplicity, coverage, density and legibility

Attributes

Methods

tick_values

Return the values of the located ticks given vmin and vmax.

tick_values(vmin, vmax)#

Return the values of the located ticks given vmin and vmax.

Note

To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance:

>>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
Parameters:
Return type:

list[float]

Inheritance

Inheritance diagram of exa.core.plotting.extended_wilkinson_tick_locator.ExtendedWilkinsonTickLocator