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 2db3ebc

Browse filesBrowse files
committed
STY: fix poor date-time format defaults
Without this change, zooming in from ticks separated by days to ticks separated by multiples of hours leaves tick labels with no date information, even when the time period covers several days. With the change there is a systematic progression from one level to the next, dropping the largest unit and adding a smaller unit.
1 parent 592e509 commit 2db3ebc
Copy full SHA for 2db3ebc

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,10 +1135,10 @@ def validate_animation_writer_path(p):
11351135
'date.autoformatter.year': ['%Y', six.text_type],
11361136
'date.autoformatter.month': ['%Y-%m', six.text_type],
11371137
'date.autoformatter.day': ['%Y-%m-%d', six.text_type],
1138-
'date.autoformatter.hour': ['%H:%M', six.text_type],
1139-
'date.autoformatter.minute': ['%H:%M:%S', six.text_type],
1138+
'date.autoformatter.hour': ['%m-%d %H', six.text_type],
1139+
'date.autoformatter.minute': ['%d %H:%M', six.text_type],
11401140
'date.autoformatter.second': ['%H:%M:%S', six.text_type],
1141-
'date.autoformatter.microsecond': ['%H:%M:%S.%f', six.text_type],
1141+
'date.autoformatter.microsecond': ['%M:%S.%f', six.text_type],
11421142

11431143
#legend properties
11441144
'legend.fancybox': [True, validate_bool],

‎matplotlibrc.template

Copy file name to clipboardExpand all lines: matplotlibrc.template
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,10 @@ backend : $TEMPLATE_BACKEND
363363
# date.autoformatter.year : %Y
364364
# date.autoformatter.month : %Y-%m
365365
# date.autoformatter.day : %Y-%m-%d
366-
# date.autoformatter.hour : %H:%M
367-
# date.autoformatter.minute : %H:%M:%S
366+
# date.autoformatter.hour : %m-%d %H
367+
# date.autoformatter.minute : %d %H:%M
368368
# date.autoformatter.second : %H:%M:%S
369-
# date.autoformatter.microsecond : %H:%M:%S.%f
369+
# date.autoformatter.microsecond : %M:%S.%f
370370

371371
### TICKS
372372
# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.