8000 Merge pull request #6229 from mineo/autodateformatter-init · bearstrong/matplotlib@bc31280 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc31280

Browse files
tacaswellbearstrong
authored andcommitted
Merge pull request matplotlib#6229 from mineo/autodateformatter-init
DOC: Add a locator to AutoDateFormatters example code
1 parent fc3f4fe commit bc31280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/dates.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ class AutoDateFormatter(ticker.Formatter):
642642
dictionary by doing::
643643
644644
645-
>>> formatter = AutoDateFormatter()
645+
>>> locator = AutoDateLocator()
646+
>>> formatter = AutoDateFormatter(locator)
646647
>>> formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec
647648
648649
A custom :class:`~matplotlib.ticker.FuncFormatter` can also be used.

0 commit comments

Comments
 (0)
0