5.3 Module graph.axis.tick: Ticks

The following classes are part of the module graph.axis.tick.

class rational( x, power=1, floatprecision=10)
This class implements a rational number with infinite precision. For that it stores two integers, the numerator num and a denominator denom. Note that the implementation of rational number arithmetics is not at all complete and designed for its special use case of axis partitioning in PyX preventing any roundoff errors.

x is the value of the rational created by a conversion from one of the following input values:

power is an integer to calculate x**power. This is useful at certain places in partitioners.

class tick( x, ticklevel=0, labellevel=0, label=None, labelattrs=[], power=1, floatprecision=10)
This class implements ticks based on rational numbers. Instances of this class can be passed to the manualticks parameter of a regular axis.

The parameters x, power, and floatprecision share its meaning with rational.

A tick has a tick level (i.e. markers at the axis path) and a label lavel (e.i. place text at the axis path), ticklevel and labellevel. These are non-negative integers or None. A value of 0 means a regular tick or label, 1 stands for a subtick or sublabel, 2 for subsubtick or subsublabel and so on. None means omitting the tick or label. label is the text of the label. When not set, it can be created automatically by a texter. labelattrs are the attributes for the labels.