Test whether the mouse event occurred in the x axis.
(self, mouseevent)
| 1792 | axis_name = 'x' |
| 1793 | |
| 1794 | def contains(self, mouseevent): |
| 1795 | """Test whether the mouse event occurred in the x axis. |
| 1796 | """ |
| 1797 | if callable(self._contains): |
| 1798 | return self._contains(self, mouseevent) |
| 1799 | |
| 1800 | x, y = mouseevent.x, mouseevent.y |
| 1801 | try: |
| 1802 | trans = self.axes.transAxes.inverted() |
| 1803 | xaxes, yaxes = trans.transform_point((x, y)) |
| 1804 | except ValueError: |
| 1805 | return False, {} |
| 1806 | l, b = self.axes.transAxes.transform_point((0, 0)) |
| 1807 | r, t = self.axes.transAxes.transform_point((1, 1)) |
| 1808 | inaxis = 0 <= xaxes <= 1 and ( |
| 1809 | b - self.pickradius < y < b or |
| 1810 | t < y < t + self.pickradius) |
| 1811 | return inaxis, {} |
| 1812 | |
| 1813 | def _get_tick(self, major): |
| 1814 | if major: |
nothing calls this directly
no test coverage detected