PlasmaCalcs.plotting.plot_tools.plot_tricks.SimpleLogTickLocator

class PlasmaCalcs.plotting.plot_tools.plot_tricks.SimpleLogTickLocator(base=10)

Bases: LogLocator

simple LogLocator: puts base^N for every next power of base.
Includes all powers, doesn’t check if it is too dense to look nice.
Also doesn’t check if it’s too sparse to look nice.

base: log base. default 10.

__init__(base=10)
Parameters
———-
basefloat, default: 10.0
The base of the log used, so major ticks are placed at `base**n`, where
`n` is an integer.
subsNone or {‘auto’, ‘all’} or sequence of float, default: (1.0,)
Gives the multiples of integer powers of the base at which to place ticks.
The default of `(1.0, )` places ticks only at integer powers of the base.
Permitted string values are `'auto'`` and ``'all'`. Both of these use an
algorithm based on the axis view limits to determine whether and how to put
ticks between integer powers of the base:
- `'auto'`: Ticks are placed only between integer powers.
- `'all'`: Ticks are placed between and at integer powers.
- `None``: Equivalent to ``'auto'`.
numticksNone or int, default: None
The maximum number of ticks to allow on a given axis. The default of
`None` will try to choose intelligently as long as this Locator has
already been assigned to an axis using ~.axis.Axis.get_tick_space, but
otherwise falls back to 9.

Methods

__init__([base])

create_dummy_axis(**kwargs)

nonsingular(vmin, vmax)

raise_if_exceeds(locs)

set_axis(axis)

set_params([base, subs, numdecs, numticks])

tick_values(vmin, vmax)

view_limits(vmin, vmax)

Attributes

MAXTICKS

axis

numdecs

nonsingular(vmin, vmax)
Adjust a range as needed to avoid singularities.
This method gets called during autoscaling, with `(v0, v1)` set to
the data limits on the Axes if the Axes contains any data, or
`(-inf, +inf)` if not.
- If `v0 == v1` (possibly up to some floating point slop), this
method returns an expanded interval around this value.
- If `(v0, v1) == (-inf, +inf)`, this method returns appropriate
default view limits.
- Otherwise, `(v0, v1)` is returned without modification.
raise_if_exceeds(locs)
Log at WARNING level if locs is longer than Locator.MAXTICKS.
This is intended to be called immediately before returning locs from
`__call__` to inform users in case their Locator returns a huge
number of ticks, causing Matplotlib to run out of memory.
The “strange” name of this method dates back to when it would raise an
exception instead of emitting a log.
set_params(base=None, subs=None, numdecs=<deprecated parameter>, numticks=None)
Set parameters within this locator.
tick_values(vmin, vmax)
return all ticks from floor(log(vmin)) to ceil(log(vmax))
(tick min and tick max won’t show up on the plot unless between view lims.)
view_limits(vmin, vmax)
Try to choose the view limits intelligently.