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

Skip to content

Commit 40b3ce9

Browse files
committed
Merge pull request #6229 from mineo/autodateformatter-init
DOC: Add a locator to AutoDateFormatters example code
1 parent 513c320 commit 40b3ce9

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