title: How to translate external mouse clicks in matplotlib
body: <p>In one computer I generate a plot using matplotlib.  Once the plot is generated is then saved into a file.  The file is used by another application external to matplotlib.  The generated PNG file is displayed to the user and the user interacts by clicking on the image file.  The X,Y pixel coordinates is recorded and sent back to the Python program that uses matplotlib, so the question is how can I translate those pixels coordinates and determine where the user clicked in my chart.  </p>
  
  <p>What I have been trying to find is a way to determine where the origin is (in pixels) so I can calculate the location in the figure itself.  For instance, if the image is 100 X 100 pixels and I know that the X and Y axis are 10 pixels from the edge of the image - origin would be at (10,10) - and I receive a mouse click of (80,80) then I would know that the actual click was at (70,70) in my plot.  So far I have not been able to find anything that will give me any reference at there the axis end and the actual plot begins.</p>