FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed logformatting for non integer bases. by pelson · Pull Request #960 · matplotlib/matplotlib · GitHub

Repository navigation

Fixed logformatting for non integer bases. - #960

Merged
WeatherGod merged 2 commits into
matplotlib:masterfrom
pelson:issue_909
Aug 3, 2012
Merged

WeatherGod merged 2 commits into
matplotlib:masterfrom
pelson:issue_909

Conversation

pelson commented Jun 20, 2012

Copy link
Copy Markdown
Member

Fixes #909.

Comment thread lib/matplotlib/ticker.py

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

pelson commented Jul 5, 2012

Copy link
Copy Markdown
Member Author

This is a small-ish change if anyone is prepared to go over it?

Copy link
Copy Markdown
Member

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?

pelson commented Jul 21, 2012

Copy link
Copy Markdown
Member Author

I agree that it is a little awkward to follow. I'm not seeing your suggestion though, do you mean make base be either "%s" or "%d" and then use that for the string interpolation later on?

Copy link
Copy Markdown
Member

Yes. Do all the string formatting at once.

pelson commented Jul 28, 2012

Copy link
Copy Markdown
Member Author

Ok @WeatherGod, I think this resolves your concern.

mdboom commented Aug 3, 2012

Copy link
Copy Markdown
Member

Looks good to me. Feel free to merge.

Copy link
Copy Markdown
Member

Right, thanks for that. Merging...

WeatherGod added a commit that referenced this pull request Aug 3, 2012
Fixed logformatting for non integer bases.
WeatherGod merged commit 797940f into matplotlib:master Aug 3, 2012
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log Formatter for tick labels can't handle non-integer base

3 participants


Back | FazBrowse Home | New Git URL