(Heavily edited:)
In python matplotlib, I want to plot y
against x
with two xscales, the lower one with linear ticks and the upper one with logarithmic ticks.
The lower x
values are an arbitrary function of the upper ones (in this case the mapping is func(x)=np.log10(1.0+x)
). Corollary: The upper x
tick positions are the same arbitrary function of the lower ones.
The positions of the data points and the tick positions for both axes must be decoupled.
I want the upper axis's logarithmic tick positions and labels to be as tidy as possible.
What is the best way to produce such a plot?
Related: http://matplotlib.1069221.n5.nabble.com/Two-y-axis-with-twinx-only-one-of-them-logscale-td18255.html
Similar (but unanswered) question?: Matplotlib: how to set ticks of twinned axis in log plot
Could be useful: https://stackoverflow.com/a/29592508/1021819