Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0104905

Browse filesBrowse files
committed
Add a locator to AutoDateFormatters example code
AutoDateFormatter.__init__ always needs a locator, so add one to the example in the documentation.
1 parent c06bb2b commit 0104905
Copy full SHA for 0104905

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/dates.py

Copy file name to clipboardExpand all lines: lib/matplotlib/dates.py
+2-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.