diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 3d2d52b04474..b906e39e7d5e 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -1414,12 +1414,7 @@ def plot(self, *args, **kwargs): def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False, **kwargs): """ - Plot with data with dates. - - Call signature:: - - plot_date(x, y, fmt='bo', tz=None, xdate=True, - ydate=False, **kwargs) + A plot with data that contains dates. Similar to the :func:`~matplotlib.pyplot.plot` command, except the *x* or *y* (or both) data is considered to be dates, and the @@ -1428,45 +1423,53 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False, *x* and/or *y* can be a sequence of dates represented as float days since 0001-01-01 UTC. - Keyword arguments: + Note if you are using custom date tickers and formatters, it + may be necessary to set the formatters/locators after the call + to meth:`plot_date` since meth:`plot_date` will set the + default tick locator to + class:`matplotlib.dates.AutoDateLocator` (if the tick + locator is not already set to a + class:`matplotlib.dates.DateLocator` instance) and the + default tick formatter to + class:`matplotlib.dates.AutoDateFormatter` (if the tick + formatter is not already set to a + class:`matplotlib.dates.DateFormatter` instance). + - *fmt*: string + Parameters + ---------- + fmt : string The plot format string. - *tz*: [ *None* | timezone string | :class:`tzinfo` instance] + tz : [ *None* | timezone string | :class:`tzinfo` instance] The time zone to use in labeling dates. If *None*, defaults to rc value. - *xdate*: [ *True* | *False* ] + xdate : boolean If *True*, the *x*-axis will be labeled with dates. - *ydate*: [ *False* | *True* ] + ydate : boolean If *True*, the *y*-axis will be labeled with dates. - Note if you are using custom date tickers and formatters, it - may be necessary to set the formatters/locators after the call - to :meth:`plot_date` since :meth:`plot_date` will set the - default tick locator to - :class:`matplotlib.dates.AutoDateLocator` (if the tick - locator is not already set to a - :class:`matplotlib.dates.DateLocator` instance) and the - default tick formatter to - :class:`matplotlib.dates.AutoDateFormatter` (if the tick - formatter is not already set to a - :class:`matplotlib.dates.DateFormatter` instance). - Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: + Returns + ------- + lines + - %(Line2D)s + See Also + -------- + matplotlib.dates : helper functions on dates + matplotlib.dates.date2num : how to convert dates to num + matplotlib.dates.num2date : how to convert num to dates + matplotlib.dates.drange : how floating point dates - .. seealso:: - :mod:`~matplotlib.dates` for helper functions + Other Parameters + ---------------- + kwargs : :class:`matplotlib.lines.Line2D` + properties : %(Line2D)s - :func:`~matplotlib.dates.date2num`, - :func:`~matplotlib.dates.num2date` and - :func:`~matplotlib.dates.drange` for help on creating the required - floating point dates. """ if not self._hold: