title: Python Matplotlib Twinx() cursor values
body: <p>I want to use the cursor (x,y values get displayed at the bottom left of figure) to measure the y and x distance between two points, however this only works for the data plotted on the second axis. </p>
  
  <p>Is there a way to switch back an forth between the second axis and first y-axis?</p>
  
  <p>Please note: I do not want a programmatic way of getting distance between points, just to use the cursor when I am viewing data in the figure plot.</p>
  
  <p>Not sure if this helps but my code is literally the example for plotting two axes from the matplotlib page:</p>
  
  <pre><code>    fig, ax1 = plt.subplots()
      ax1.plot(sensor1, 'b-')
      ax1.set_xlabel('(time)')
      # Make the y-axis label and tick labels match the line color.
      ax1.set_ylabel('Sensor 1', color='b')
      for tl in ax1.get_yticklabels():
          tl.set_color('b')
  
  
      ax2 = ax1.twinx()
      ax2.plot(sensor2, 'r.')
      ax2.set_ylabel('Sensor 2', color='r')
      for tl in ax2.get_yticklabels():
          tl.set_color('r')
      plt.show()
  </code></pre>