I have some data where the X variable is already on a (natural) log scale. I want a Matplotlib plot that formats the x-axis so that the major and minor ticks appear identical to those that would be given if the X variable is back-transformed to a linear scale, and plt.xscale('log')
is used. In other words, I want pretty logarithmic tickmarks and labels, but I definitely don't want to back-transform the underlying data. I guess this involves explicitly setting the tick mark locations and labels. Is there a way to access the algorithm that Matplotlib uses for laying out logarithmically-spaced ticks without setting plt.xscale('log')
?
Asked
Active
Viewed 75 times
1

user2667066
- 1,867
- 2
- 19
- 30
-
1Maybe [this](https://stackoverflow.com/questions/44078409/matplotlib-semi-log-plot-minor-tick-marks-are-gone-when-range-is-large) helps – scleronomic Sep 24 '20 at 11:51
-
Yes, that's it. Thanks! – user2667066 Sep 24 '20 at 12:11