title: How to produce an exponentially scaled axis?
body: <p>Consider the following code:</p>
  
  <pre><code>from numpy import log2
  import matplotlib.pyplot as plt
  
  xdata = [log2(x)*(10/log2(10)) for x in range(1,11)]
  ydata = range(10)
  plt.plot(xdata, ydata)
  plt.show()
  </code></pre>
  
  <p>This produces the following plot: <img src="https://i.stack.imgur.com/dlF3b.png" alt="The plot I do not want"> My question is, how can I modify this, so that the plot, with the exact same data as input, appears as a straight line? This basically requires scaling the x-axis appropriately, but I cannot figure how to do this. The reason for doing this is that I am displaying a function that changes very little at the beginning, but starts to fluctuate more towards the end of the valid interval, so I want to have a higher horizontal resolution towards the end. If anyone can propose an alternative solution to my approach, feel free to do so!</p>