Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Clarify terminology #26257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions galleries/examples/ticks/date_formatters_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def plot_axis(ax, locator=None, xmax='2002-02-01', fmt=None, formatter=None):
fontsize=14, fontname='Monospace', color='tab:blue')

# %%
# :ref:`Date locators <date-tickers>`
# -----------------------------------
# :ref:`date-locators`
# --------------------


locators = [
Expand Down
22 changes: 11 additions & 11 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`~matplotlib.units` to convert `datetime.datetime`, and `numpy.datetime64`
objects when plotted on an x- or y-axis. The user does not
need to do anything for dates to be formatted, but dates often have strict
formatting needs, so this module provides many axis locators and formatters.
formatting needs, so this module provides many tick locators and formatters.
A basic example using `numpy.datetime64` is::

import numpy as np
Expand Down Expand Up @@ -82,12 +82,12 @@
In [1]: date(2006, 4, 1).toordinal() - date(1, 1, 1).toordinal()
Out[1]: 732401

All the Matplotlib date converters, tickers and formatters are timezone aware.
All the Matplotlib date converters, locators and formatters are timezone aware.
If no explicit timezone is provided, :rc:`timezone` is assumed, provided as a
string. If you want to use a different timezone, pass the *tz* keyword
argument of `num2date` to any date tickers or locators you create. This can
be either a `datetime.tzinfo` instance or a string with the timezone name that
can be parsed by `~dateutil.tz.gettz`.
argument of `num2date` to any date tick locators or formatters you create. This
can be either a `datetime.tzinfo` instance or a string with the timezone name
that can be parsed by `~dateutil.tz.gettz`.

A wide range of specific and general purpose date tick locators and
formatters are provided in this module. See
Expand All @@ -99,12 +99,12 @@

.. _dateutil: https://dateutil.readthedocs.io

.. _date-tickers:
.. _date-locators:

Date tickers
------------
Date tick locators
------------------

Most of the date tickers can locate single or multiple values. For example::
Most of the date tick locators can locate single or multiple ticks. For example::

# import constants for the days of the week
from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU
Expand All @@ -126,7 +126,7 @@
rule = rrulewrapper(YEARLY, byeaster=1, interval=5)
loc = RRuleLocator(rule)

The available date tickers are:
The available date tick locators are:

* `MicrosecondLocator`: Locate microseconds.

Expand Down Expand Up @@ -622,7 +622,7 @@ def _wrap_in_tex(text):
return ret_text


## date tickers and formatters ###
## date tick locators and formatters ###


class DateFormatter(ticker.Formatter):
Expand Down