matplotlib.pyplot.
plot_date
(x, y, fmt='o', tz=None, xdate=True, ydate=False, hold=None, data=None, **kwargs)¶Plot data that contains dates.
Similar to plot
, this plots y vs. x as lines or markers.
However, the axis labels are formatted as dates depending on xdate
and ydate.
Parameters: | x, y : array-like
fmt : str, optional
tz : [ None | timezone string |
xdate : bool, optional, default: True
ydate : bool, optional, default: False
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | lines
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Other Parameters: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
**kwargs
|
See also
matplotlib.dates
matplotlib.dates.date2num
matplotlib.dates.num2date
matplotlib.dates.drange
Notes
If you are using custom date tickers and formatters, it may be
necessary to set the formatters/locators after the call to
plot_date
. plot_date
will set the default tick locator to
AutoDateLocator
(if the tick locator is not already set to a
DateLocator
instance) and the default tick formatter to
AutoDateFormatter
(if the tick formatter is not already set to a
DateFormatter
instance).
Note
In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]:
matplotlib.pyplot.plot_date
¶