@@ -1381,64 +1381,66 @@ def plot(self, *args, **kwargs):
1381
1381
def plot_date (self , x , y , fmt = 'o' , tz = None , xdate = True , ydate = False ,
1382
1382
** kwargs ):
1383
1383
"""
1384
- A plot with data that contains dates.
1385
-
1386
- Similar to the :func:`~matplotlib.pyplot.plot` command, except
1387
- the *x* or *y* (or both) data is considered to be dates, and the
1388
- axis is labeled accordingly.
1389
-
1390
- *x* and/or *y* can be a sequence of dates represented as float
1391
- days since 0001-01-01 UTC.
1392
-
1393
- Note if you are using custom date tickers and formatters, it
1394
- may be necessary to set the formatters/locators after the call
1395
- to :meth:`plot_date` since :meth:`plot_date` will set the
1396
- default tick locator to
1397
- :class:`matplotlib.dates.AutoDateLocator` (if the tick
1398
- locator is not already set to a
1399
- :class:`matplotlib.dates.DateLocator` instance) and the
1400
- default tick formatter to
1401
- :class:`matplotlib.dates.AutoDateFormatter` (if the tick
1402
- formatter is not already set to a
1403
- :class:`matplotlib.dates.DateFormatter` instance).
1384
+ Plot data that contains dates.
1404
1385
1386
+ Similar to `.plot`, this plots *y* vs. *x* as lines or markers.
1387
+ However, the axis labels are formatted as dates depending on *xdate*
1388
+ and *ydate*.
1405
1389
1406
1390
Parameters
1407
1391
----------
1408
- fmt : string
1409
- The plot format string.
1392
+ x, y : array-like
1393
+ The coordinates of the data points. If *xdate* or *ydate* is
1394
+ *True*, the respective values *x* or *y* are interpreted as
1395
+ :ref:`Matplotlib dates <date-format>`.
1396
+
1397
+ fmt : str, optional
1398
+ The plot format string. For details, see the corresponding
1399
+ parameter in `.plot`.
1410
1400
1411
1401
tz : [ *None* | timezone string | :class:`tzinfo` instance]
1412
- The time zone to use in labeling dates. If *None*, defaults to rc
1413
- value .
1402
+ The time zone to use in labeling dates. If *None*, defaults to
1403
+ rcParam ``timezone`` .
1414
1404
1415
- xdate : boolean
1416
- If *True*, the *x*-axis will be labeled with dates.
1405
+ xdate : bool, optional, default: True
1406
+ If *True*, the *x*-axis will be interpreted as Matplotlib dates.
1417
1407
1418
- ydate : boolean
1419
- If *True*, the *y*-axis will be labeled with dates.
1408
+ ydate : bool, optional, default: False
1409
+ If *True*, the *y*-axis will be interpreted as Matplotlib dates.
1420
1410
1421
1411
1422
1412
Returns
1423
1413
-------
1424
1414
lines
1415
+ A list of `.Line2D` objects that were added to the axes.
1425
1416
1426
1417
1427
- See Also
1428
- --------
1429
- matplotlib.dates : helper functions on dates
1430
- matplotlib.dates.date2num : how to convert dates to num
1431
- matplotlib.dates.num2date : how to convert num to dates
1432
- matplotlib.dates.drange : how floating point dates
1433
-
1434
1418
Other Parameters
1435
1419
----------------
1436
- **kwargs :
1420
+ **kwargs
1437
1421
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
1438
1422
properties:
1439
1423
1440
1424
%(Line2D)s
1441
1425
1426
+
1427
+ See Also
1428
+ --------
1429
+ matplotlib.dates : Helper functions on dates.
1430
+ matplotlib.dates.date2num : Convert dates to num.
1431
+ matplotlib.dates.num2date : Convert num to dates.
1432
+ matplotlib.dates.drange : Create an equally spaced sequence of dates.
1433
+
1434
+
1435
+ Notes
1436
+ -----
1437
+ If you are using custom date tickers and formatters, it may be
1438
+ necessary to set the formatters/locators after the call to
1439
+ `.plot_date`. `.plot_date` will set the default tick locator to
1440
+ `.AutoDateLocator` (if the tick locator is not already set to a
1441
+ `.DateLocator` instance) and the default tick formatter to
1442
+ `.AutoDateFormatter` (if the tick formatter is not already set to a
1443
+ `.DateFormatter` instance).
1442
1444
"""
1443
1445
1444
1446
if not self ._hold :
0 commit comments