Version 2.2.2
matplotlib

matplotlib.axis.XAxis.contains

XAxis.contains(mouseevent)

Test whether the mouse event occurred in the x axis.