Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a68c13

Browse files
committed
Merge pull request #6229 from mineo/autodateformatter-init
DOC: Add a locator to AutoDateFormatters example code
2 parents c06bb2b + 0104905 commit 7a68c13

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)