Search code examples
matplotlibplotcoordinatesareafigure

matplotlib figure coordinates of plot area


How do you find the location of the plot area of an axes in figure coordinates or pixel coordinates?

I'm actually trying to capture click and motion events on the x axis area below the plot. So I'm getting an event and trying to test if it's y coordinate is below the plot area. I would think this is simple, but I can't seem to find anything by searching.


Solution

  • SOLVED - found it - wasn't easy to find - axes.bbox.bounds bounds is in pixels, same as the event.