| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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.). |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
I agree with @Tillsten's suggestion that this needs to be implemented as an option, not as the sole formatting method. |
Sorry, something went wrong.
|
I'd be fine with having it as an option, but what about exposing that option at the level of set_xscale/set_yscale too? (so that users to have to go an import the logformatter class etc.?) |
Sorry, something went wrong.
|
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
|
Sorry, something went wrong.
|
👍 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. |
Sorry, something went wrong.
|
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 ax.xaxis.set_minor_locator(ticker.LogLocator(subs=[1,2,5]) ax.xaxis.set_major_formatter(ticker.NullFormatter()) ax.xaxis.set_minor_formatter(ticker.LogFormatter(labelOnlyBase=False)) will add labels on 1, 2, 5 multiples of the base. However, this does not work with ticker.LogFormatterMathtext, which will show 10^{4.30} instead of 2\times10^{4}, and you lose all the other minor ticks. 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? |
Sorry, something went wrong.
|
Please make a separate issue. On Wed, Jul 29, 2015, 7:49 AM Victor Zabalza notifications@github.com
|
Sorry, something went wrong.
|
Regarding how to make this an option, I think it would be worth including it in rcParams: it is something a user will likely always want on or off because of personal preference, but rarely on a per-plot basis. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@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? |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@zblz - it would be great if you could take over and just cherry-pick my commits - thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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?