Skip to content

Commit e764e0f

Browse files
authored
Merge pull request #7815 from efiring/date_labels
STY: fix poor date-time format defaults
2 parents 58fbfbd + 2db3ebc commit e764e0f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/rcsetup.py

Lines 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

Lines 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)