def contains(self,mouseevent):
if callable(self._contains): return self._contains(self,mouseevent)<EOL>x,y = mouseevent.x,mouseevent.y<EOL>try:<EOL><INDENT>trans = self.axes.transAxes.inverted()<EOL>xaxes,yaxes = trans.transform_point((x,y))<EOL><DEDENT>except ValueError:<EOL><INDENT>return False, {}<EOL><DEDENT>l,b = self.axes.transAxes.transform_point((<NUM_LIT:0>,<NUM_LIT:0>))<EOL>r,t = self.axes.transAxes.transform_point((<NUM_LIT:1>,<NUM_LIT:1>))<EOL>inaxis = xaxes>=<NUM_LIT:0> and xaxes<=<NUM_LIT:1> and (<EOL>(y<b and y>b-self.pickradius) or<EOL>(y>t and y<t+self.pickradius))<EOL>return inaxis, {}<EOL>
Test whether the mouse event occured in the x axis.