-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fixed logformatting for non integer bases. #960
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
Conversation
@@ -567,9 +567,8 @@ class LogFormatter(Formatter): | |||
""" | |||
Format values for log axis; | |||
|
|||
if attribute *decadeOnly* is True, only the decades will be labelled. |
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.
This is not true:
$> grep -ir decadeOnly *
Binary file doc/build/doctrees/api/ticker_api.doctree matches
doc/build/html/api/ticker_api.html:<p>if attribute <em>decadeOnly</em> is True, only the decades will be labelled.</p>
lib/matplotlib/ticker.py: if attribute *decadeOnly* is True, only the decades will be labelled.
lib/matplotlib/ticker.py: self.decadeOnly = True
This is a small-ish change if anyone is prepared to go over it? |
I don't like how you do the string formatting of the 'b' variable separately from the formatting of the rest of the label. Why not do the string concatenation of the needed format string for the base and then do all the formatting at once? |
I agree that it is a little awkward to follow. I'm not seeing your suggestion though, do you mean make |
Yes. Do all the string formatting at once. |
Ok @WeatherGod, I think this resolves your concern. |
Looks good to me. Feel free to merge. |
Right, thanks for that. Merging... |
Fixed logformatting for non integer bases.
Fixes #909.