@@ -1535,64 +1535,70 @@ def plot(self, *args, **kwargs):
1535
1535
def plot_date (self , x , y , fmt = 'o' , tz = None , xdate = True , ydate = False ,
1536
1536
** kwargs ):
1537
1537
"""
1538
- A plot with data that contains dates.
1538
+ Plot data that contains dates.
1539
1539
1540
- Similar to the :func:`~matplotlib.pyplot. plot` command, except
1541
- the *x* or *y* (or both) data is considered to be dates, and the
1542
- axis is labeled accordingly .
1540
+ Similar to `. plot`, this plots *y* vs. *x* as lines or markers.
1541
+ However, the axis labels are formatted as dates depending on *xdate*
1542
+ and *ydate* .
1543
1543
1544
- *x* and/or *y* can be a sequence of dates represented as float
1545
- days since 0001-01-01 UTC.
1546
-
1547
- Note if you are using custom date tickers and formatters, it
1548
- may be necessary to set the formatters/locators after the call
1549
- to :meth:`plot_date` since :meth:`plot_date` will set the
1550
- default tick locator to
1551
- :class:`matplotlib.dates.AutoDateLocator` (if the tick
1552
- locator is not already set to a
1553
- :class:`matplotlib.dates.DateLocator` instance) and the
1554
- default tick formatter to
1555
- :class:`matplotlib.dates.AutoDateFormatter` (if the tick
1556
- formatter is not already set to a
1557
- :class:`matplotlib.dates.DateFormatter` instance).
1544
+ Note: If you are using custom date tickers and formatters, it may be
1545
+ necessary to set the formatters/locators after the call to
1546
+ `.plot_date`. `.plot_date` will set the default tick locator to
1547
+ `.AutoDateLocator` (if the tick locator is not already set to a
1548
+ `.DateLocator` instance) and the default tick formatter to
1549
+ `.AutoDateFormatter` (if the tick formatter is not already set to a
1550
+ `.DateFormatter` instance).
1558
1551
1559
1552
1560
1553
Parameters
1561
1554
----------
1562
- fmt : string
1563
- The plot format string.
1555
+ x, y : array-like
1556
+ The coordinates of the data points. If *xdate* or *ydate* is
1557
+ *True*, the respective values *x* or *y* are interpreted as
1558
+ :ref:`Matplotlib dates <date-format>`.
1559
+
1560
+ fmt : str, optional
1561
+ The plot format string. For details, see the corresponding
1562
+ parameter in `.plot`.
1564
1563
1565
1564
tz : [ *None* | timezone string | :class:`tzinfo` instance]
1566
- The time zone to use in labeling dates. If *None*, defaults to rc
1567
- value .
1565
+ The time zone to use in labeling dates. If *None*, defaults to
1566
+ rcParam ``timezone`` .
1568
1567
1569
- xdate : boolean
1570
- If *True*, the *x*-axis will be labeled with dates.
1568
+ xdate : bool, optional, default: True
1569
+ If *True*, the *x*-axis will be interpreted as Matplotlib dates.
1571
1570
1572
- ydate : boolean
1573
- If *True*, the *y*-axis will be labeled with dates.
1571
+ ydate : bool, optional, default: False
1572
+ If *True*, the *y*-axis will be interpreted as Matplotlib dates.
1574
1573
1575
1574
1576
1575
Returns
1577
1576
-------
1578
1577
lines
1578
+ A list of `.Line2D` objects that were added to the axes.
1579
1579
1580
1580
1581
- See Also
1582
- --------
1583
- matplotlib.dates : helper functions on dates
1584
- matplotlib.dates.date2num : how to convert dates to num
1585
- matplotlib.dates.num2date : how to convert num to dates
1586
- matplotlib.dates.drange : how floating point dates
1587
-
1588
1581
Other Parameters
1589
1582
----------------
1590
- **kwargs :
1583
+ **kwargs
1591
1584
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
1592
1585
properties:
1593
1586
1594
1587
%(Line2D)s
1595
1588
1589
+
1590
+ See Also
1591
+ --------
1592
+ matplotlib.dates : Helper functions on dates.
1593
+ matplotlib.dates.date2num : Convert dates to num.
1594
+ matplotlib.dates.num2date : Convert num to dates.
1595
+ matplotlib.dates.drange : Create an equally spaced sequence of dates.
1596
+
1597
+
1598
+ Notes
1599
+ -----
1600
+ .. [notes section required to get data note injection right]
1601
+
1596
1602
"""
1597
1603
1598
1604
if not self ._hold :
0 commit comments