Locator

Locator(locator, *args, **kwargs)[source]

Returns a Locator instance, used to interpret the xlocator, xlocator_kw, ylocator, ylocator_kw, xminorlocator, xminorlocator_kw, yminorlocator, and yminorlocator_kw arguments when passed to format, and the locator, locator_kw minorlocator, and minorlocator_kw arguments when passed to colorbar methods wrapped by colorbar_wrapper.

Parameters
  • locator (Locator, str, float, or list of float) – If Locator, 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'

    NullLocator

    No ticks

    'auto'

    AutoLocator

    Major ticks at sensible locations

    'minor'

    AutoMinorLocator

    Minor ticks at sensible locations

    'date'

    AutoDateLocator

    Default tick locations for datetime axes

    'log'

    LogLocator preset

    For log-scale axes, ticks on each power of the base

    'logminor'

    LogLocator preset

    For log-scale axes, ticks on the 1st through 9th multiples of each power of the base

    'maxn'

    MaxNLocator

    No more than N ticks at sensible locations

    'linear'

    LinearLocator

    Exactly N ticks encompassing the axis limits, spaced as numpy.linspace(lo, hi, N)

    'multiple'

    MultipleLocator

    Ticks every N step away from zero

    'fixed'

    FixedLocator

    Ticks at these exact locations

    'index'

    IndexLocator

    Ticks on the non-negative integers

    'symlog'

    SymmetricalLogLocator

    Ticks for symmetrical log-scale axes

    'logit'

    LogitLocator

    Ticks for logit-scale axes

    'theta'

    ThetaLocator

    Like the base locator but default locations are every numpy.pi/8 radians

    'year'

    YearLocator

    Ticks every N years

    'month'

    MonthLocator

    Ticks every N months

    'weekday'

    WeekdayLocator

    Ticks every N weekdays

    'day'

    DayLocator

    Ticks every N days

    'hour'

    HourLocator

    Ticks every N hours

    'minute'

    MinuteLocator

    Ticks every N minutes

    'second'

    SecondLocator

    Ticks every N seconds

    'microsecond'

    MicrosecondLocator

    Ticks every N microseconds

  • *args, **kwargs – Passed to the Locator class.

Returns

Locator – A Locator instance.