title: What is the correct way to replace matplotlib tick labels with computed values?
body: <p>I have a figure with a log axis</p>
  
  <p><img src="https://i.stack.imgur.com/8grfd.png" alt="enter image description here"></p>
  
  <p>and I would like to relabel the axis ticks with logs of the values, rather than the values themselves</p>
  
  <p><img src="https://i.stack.imgur.com/eiKhw.png" alt="enter image description here"></p>
  
  <p>The way I've accomplished this is with</p>
  
  <pre><code>plt.axes().set_xticklabels([math.log10(x) for x in plt.axes().get_xticks()])
  </code></pre>
  
  <p>but I wonder if there isn't a less convoluted way to do this.</p>
  
  <p>What is the correct idiom for systematically relabeling ticks on <code>matplotlib</code> plots with values computed from the original tick values?</p>