-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DFLT: change formats for AutoDateFormatter #5445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Configuration (rcParams) | ||
------------------------ | ||
|
||
|
||
+----------------------------+--------------------------------------------------+ | ||
| Parameter | Description | | ||
+============================+==================================================+ | ||
|`date.autoformatter.year` | foramt string for 'year' scale dates | | ||
+----------------------------+--------------------------------------------------+ | ||
|`date.autoformatter.month` | format string for 'month' scale dates | | ||
+----------------------------+--------------------------------------------------+ | ||
|`date.autoformatter.day` | format string for 'day' scale dates | | ||
+----------------------------+--------------------------------------------------+ | ||
|`date.autoformatter.hour` | format string for 'hour' scale times | | ||
+----------------------------+--------------------------------------------------+ | ||
|`date.autoformatter.minute` | format string for 'minute' scale times | | ||
+----------------------------+--------------------------------------------------+ | ||
|`date.autoformatter.second` | format string for 'second' scale times | | ||
+----------------------------+--------------------------------------------------+ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,6 +265,7 @@ backend : %(backend)s | |
# small compared to the minimum absolute | ||
# value of the data. | ||
|
||
|
||
#axes.unicode_minus : True # use unicode for the minus symbol | ||
# rather than hyphen. See | ||
# http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes | ||
|
@@ -279,6 +280,22 @@ backend : %(backend)s | |
#polaraxes.grid : True # display grid on polar axes | ||
#axes3d.grid : True # display grid on 3d axes | ||
|
||
### DATES | ||
# These control the default format strings used in AutoDateFormatter. | ||
# Any valid format datetime format string can be used (see the python | ||
# `datetime` for details). For example using '%%x' will use the locale date representation | ||
# '%%X' will use the locale time representation and '%%c' will use the full locale datetime | ||
# representation. | ||
# These values map to the scales: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to include a note that doubling up on the percent signs is only needed for the rcfile. I am assuming that setting the rcParam directly does not need doubling up on the percent signs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And actually it's only needed for the template. People's local matplotlibrc's don't need it. This is because the template is first interpolated to set the default backend. We could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, the little-known string.Template module might be better. We can On Mon, Nov 9, 2015 at 11:53 AM, Michael Droettboom <
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WeatherGod indeed on both accounts |
||
# {'year': 365, 'month': 30, 'day': 1, 'hour': 1/24, 'minute': 1 / (24 * 60)} | ||
|
||
# date.autoformatter.year : '%%Y' | ||
# date.autoformatter.month : '%%Y-%%m' | ||
# date.autoformatter.day : '%%Y-%%m-%%d' | ||
# date.autoformatter.hour : '%%H:%%M' | ||
# date.autoformatter.minute : '%%H:%%M:%%S' | ||
# date.autoformatter.second : '%%H:%%M:%%S.%%f' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto with the |
||
|
||
### TICKS | ||
# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick | ||
#xtick.major.size : 4 # major tick size in points | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to include hours when resolving down to the fractions of a second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I just noticed that this is the classic style... nm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the
'
need to be removed here. They are included verbatim in the result. Even without them, the spaces are preserved.