Locator¶
-
Locator
(locator, *args, **kwargs)[source]¶ Return a
Locator
instance. This function is used to interpret thexlocator
,xlocator_kw
,ylocator
,ylocator_kw
,xminorlocator
,xminorlocator_kw
,yminorlocator
, andyminorlocator_kw
arguments when passed toformat
, and thelocator
,locator_kw
minorlocator
, andminorlocator_kw
arguments when passed to colorbar methods wrapped bycolorbar_wrapper
.- Parameters
locator (
Locator
, str, float, or list of float) – IfLocator
, the object is returned.If number, specifies the multiple used to define tick separation. Returns a
MultipleLocator
instance.If list of numbers, these points are ticked. Returns a
FixedLocator
instance.If string, a dictionary lookup is performed (see below table).
Key
Class
Description
'null'
,'none'
No ticks
'auto'
Major ticks at sensible locations
'minor'
Minor ticks at sensible locations
'date'
Default tick locations for datetime axes
'fixed'
Ticks at these exact locations
'index'
Ticks on the non-negative integers
'linear'
Exactly
N
ticks encompassing the axis limits, spaced asnumpy.linspace(lo, hi, N)
'log'
Ticks for log-scale axes
'logminor'
LogLocator
presetTicks for log-scale axes on the 1st through 9th multiples of each power of the base
'logit'
Ticks for logit-scale axes
'logitminor'
LogitLocator
presetTicks for logit-scale axes with
minor=True
passed toLogitLocator
'maxn'
No more than
N
ticks at sensible locations'multiple'
Ticks every
N
step away from zero'symlog'
Ticks for symmetrical log-scale axes
'symlogminor'
SymmetricalLogLocator
presetTicks for symmetrical log-scale axes on the 1st through 9th multiples of each power of the base
'theta'
Like the base locator but default locations are every
numpy.pi
/8 radians'year'
Ticks every
N
years'month'
Ticks every
N
months'weekday'
Ticks every
N
weekdays'day'
Ticks every
N
days'hour'
Ticks every
N
hours'minute'
Ticks every
N
minutes'second'
Ticks every
N
seconds'microsecond'
Ticks every
N
microseconds*args, **kwargs – Passed to the
Locator
class.
- Returns