Locator¶
- Locator(locator, *args, **kwargs)[source]¶
Return a
Locator
instance.- Parameters
locator (
Locator
,str
,float
, or sequence) – The locator specification, interpreted as follows:If a
Locator
instance already, the input argument is simply returned.If a sequence of numbers, these points are ticked. Returns a
FixedLocator
.If number, this specifies the step size between tick locations. Returns a
MultipleLocator
.
Otherwise,
locator
should be a string corresponding to one of the “registered” locators (see below table). Iflocator
is a list or tuple and the first element is a “registered” locator name, subsequent elements are passed to the locator class as positional arguments. For example,pplt.Locator(('multiple', 5))
is equivalent topplt.Locator('multiple', 5)
.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 axis limits, spaced asnumpy.linspace(lo, hi, N)
'log'
For log-scale axes
'logminor'
For log-scale axes on the 1st through 9th multiples of each power of the base
'logit'
For logit-scale axes
'logitminor'
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'
For symlog-scale axes
'symlogminor'
For symlog-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'lon'
,'deglon'
Longitude gridlines at sensible decimal locations
'lat'
,'deglat'
Latitude gridlines at sensible decimal locations
'dms'
Gridlines on nice minute and second intervals
'dmslon'
Longitude gridlines on nice minute and second intervals
'dmslat'
Latitude gridlines on nice minute and second intervals
- Other Parameters
*args, **kwargs – Passed to the
Locator
class.- Returns