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
Add additional minor labels in log axis with a span less than two decades #4867
Comments
I am somewhat ambivalent on this as I am not convinced of the utility of log scaled axis with less than 2 decades of data. |
In my field (high energy astrophysics) they are extremely common: the This would be useful for the gammapy and 2015-08-05 14:46 GMT+01:00 Thomas A Caswell notifications@github.com:
|
Fair enough. I come from a soft-matter physics background where we are looking for power laws in noisy data, with less than 2 decades just about any powerlaw can be made to fit, hence my skepticism. |
Another case where it would be nice to have labels for a short span of On 8/5/15, Thomas A Caswell notifications@github.com wrote:
|
Is this fixed by the above PR? |
For plots with log axis that have limits of the order or less than two decades, only one label is shown:
Which does not give a very good idea of the values of the x axis. Adding labels to the minor ticks results in a mess, including non-helpful labels such as
10^{4.30}
:And limiting them at
[2,5]*base**i
results in losing all other minor ticks:The decimals in the exponent can be resolved using LogFormatter, but it is not a nice representation for axis and requires changing the major formatter to match:
Finally, the only way to get them in a consistent manner with the major tick labels, while preserving all minor ticks, is to set them manually, which is far from ideal:
I think that there should be a
LogFormatterMathtext
with asubs
options like the locator, and an option to factors instead of decimal exponents. I will take a look at theLogFormatterMathtext
and try to modify it in the following days. If it looks good, I would propose to switch to it automatically for axis spanning less than two decades.Note that this issue has been reported in a stackoverflow question where a custom formatter is proposed as an answer.
This is somewhat related to the issue #4730 because the lack of labels is particularly noticeable when the axis is around 0.1,1,10, where it would make a lot of sense to have labels at [0.1,0.2,2,5,20,50].
The text was updated successfully, but these errors were encountered: