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