It may be instantiated directly, or subclassed.
The :None:None:`set_locs`
method must be called to enable the subsetting logic controlled by the minor_thresholds
parameter.
In some cases such as the colorbar, there is no distinction between major and minor ticks; the tick locations might be set manually, or by a locator that puts ticks at integer powers of base and at intermediate locations. For this situation, disable the minor_thresholds logic by using minor_thresholds=(np.inf, np.inf)
, so that all ticks will be labeled.
To disable labeling of minor ticks when 'labelOnlyBase' is False, use minor_thresholds=(0, 0)
. This is the default for the "classic" style.
Base of the logarithm used in all calculations.
If True, label ticks only at integer powers of base. This is normally True for major ticks and False for minor ticks.
If labelOnlyBase is False, these two numbers control the labeling of ticks that are not at integer powers of base; normally these are the minor ticks. The controlling parameter is the log of the axis data range. In the typical case where base is 10 it is the number of decades spanned by the axis, so we can call it 'numdec'. If numdec <= all
, all minor ticks will be labeled. If all < numdec <= subset
, then only a subset of minor ticks will be labeled, so as to avoid crowding. If numdec > subset
then no minor ticks will be labeled.
If a symmetric log scale is in use, its linthresh
parameter must be supplied here.
Base class for formatting ticks on a log or symlog scale.
To label a subset of minor ticks when the view limits span up to 2 decades, and all of the ticks when zoomed in to 0.5 decades or less, use minor_thresholds=(2, 0.5)
.
To label all minor ticks when the view limits span up to 1.5 decades, use minor_thresholds=(1.5, 1.5)
.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.ticker
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them