Test whether the mouse event occurred in the x-axis.
(self, mouseevent)
| 2573 | self.offset_text_position = 'bottom' |
| 2574 | |
| 2575 | def contains(self, mouseevent): |
| 2576 | """Test whether the mouse event occurred in the x-axis.""" |
| 2577 | if self._different_canvas(mouseevent): |
| 2578 | return False, {} |
| 2579 | x, y = mouseevent.x, mouseevent.y |
| 2580 | try: |
| 2581 | trans = self.axes.transAxes.inverted() |
| 2582 | xaxes, yaxes = trans.transform((x, y)) |
| 2583 | except ValueError: |
| 2584 | return False, {} |
| 2585 | (l, b), (r, t) = self.axes.transAxes.transform([(0, 0), (1, 1)]) |
| 2586 | inaxis = 0 <= xaxes <= 1 and ( |
| 2587 | b - self._pickradius < y < b or |
| 2588 | t < y < t + self._pickradius) |
| 2589 | return inaxis, {} |
| 2590 | |
| 2591 | def set_label_position(self, position): |
| 2592 | """ |
nothing calls this directly
no test coverage detected