-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[WIP] Proposed improvement in default log formatting #4730
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
Actual i disgree on that, i like the first graph more . Note a option in LogFormattter when to use scientific notation would be wonderful, (e.g. min_exponent=2 for the behavior proposed.). |
My first reaction was "no", but then I looked at it again and I like it. I can't find any examples of other people doing this, though. |
I agree with @Tillsten's suggestion that this needs to be implemented as an option, not as the sole formatting method. |
I'd be fine with having it as an option, but what about exposing that option at the level of |
That probably makes sense to allow formatter options to pass through, but It might be simpler to just document how to mutate the locator/formatter It feels like we have a lot of inconsistent apis due to requests like this On Sun, Jul 19, 2015, 3:08 AM Thomas Robitaille notifications@github.com
|
👍 for having this as an option. Whichever API makes it into the examples gallery is the only one I'm every likely to use, unless it shows up on a stackoverflow question. |
Another issue related to this one I usually encounter is with axis that have limits of the order of a decade or two. For these, only a couple of labels will be shown. A combination of
will add labels on 1, 2, 5 multiples of the base. However, this does not work with Now that I reread it, this might need to go in a separate issue. Do you think it's worth to do it for the default change? |
Please make a separate issue. On Wed, Jul 29, 2015, 7:49 AM Victor Zabalza notifications@github.com
|
Regarding how to make this an option, I think it would be worth including it in |
We plan to make this the new default for 2.0 (which means it will grow an rcParam so that classic mode will work). But we'll need to fix the baseline issue first. |
@mdboom Please don't, I still don't see why -1, 0, 1 should be special powers in a log plot: In symlog-plots the different notations are often use to mark the linear and the log-part separately. I also never heard anybody complain about 10^0 or 10^1. |
@astrofrog, @tacaswell and I have decided that this would be a nice option, but given the differences of opinion about making it a default, we will not do so in 2.0. Would you augment this PR, please, to provide rcParams control? |
@astrofrog: Do you have time to finish this with rcParams control? I am finishing up #5161, and this PR would be a nice companion. I can take over if you don't have the time. |
@zblz - it would be great if you could take over and just cherry-pick my commits - thanks! |
Closing as work is continued in #6834 |
This is a proposed change in defaults for the upcoming 2.0 release, in response to @tacaswell's email on the matplotlib list (and this is by no means a finished PR).
When making log plots, having 10^0 and 10^1 instead of 1 and 10 looks unpolished and I often encounter users that comment (negatively) on it:
I would like to propose that we fix this properly and make it so that the default log formatter uses 0.1, 1, and 10 in instead of 10^-1, 10^0, and 10^1. The current PR gives:
The PR here is clearly not the final answer - at the moment you can see that the baseline for the labels is wrong on the x-axis for the 0.1, 1, and 10 values due to the lack of exponent. Presumably we could align the labels using the bottom of the labels instead of the top. Or we could an empty exponent. But for the y-axis, this looks a lot nicer. This would also need tests, etc.
Any thoughts about this?