{"record":{"id":"057e8d9c7010d6eb","repo":"matplotlib/matplotlib","slug":"another-axes-already-grabs-mouse-input","errorCode":null,"errorMessage":"Another Axes already grabs mouse input","messagePattern":"Another Axes already grabs mouse input","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/matplotlib/backend_bases.py","lineNumber":1933,"sourceCode":"        \"\"\"\n        axes_list = [a for a in self.figure.get_axes()\n                     if a.patch.contains_point(xy) and a.get_visible()]\n        if axes_list:\n            axes = cbook._topmost_artist(axes_list)\n        else:\n            axes = None\n\n        return axes\n\n    def grab_mouse(self, ax):\n        \"\"\"\n        Set the child `~.axes.Axes` which is grabbing the mouse events.\n\n        Usually called by the widgets themselves. It is an error to call this\n        if the mouse is already grabbed by another Axes.\n        \"\"\"\n        if self.mouse_grabber not in (None, ax):\n            raise RuntimeError(\"Another Axes already grabs mouse input\")\n        self.mouse_grabber = ax\n\n    def release_mouse(self, ax):\n        \"\"\"\n        Release the mouse grab held by the `~.axes.Axes` *ax*.\n\n        Usually called by the widgets. It is ok to call this even if *ax*\n        doesn't have the mouse grab currently.\n        \"\"\"\n        if self.mouse_grabber is ax:\n            self.mouse_grabber = None\n\n    def set_cursor(self, cursor):\n        \"\"\"\n        Set the current cursor.\n\n        This may have no effect if the backend does not display anything.\n","sourceCodeStart":1915,"sourceCodeEnd":1951,"githubUrl":"https://github.com/matplotlib/matplotlib/blob/b379c1b69e012b142c0f496a52bcb30513802d72/lib/matplotlib/backend_bases.py#L1915-L1951","documentation":"Error \"Another Axes already grabs mouse input\" thrown in matplotlib/matplotlib.","triggerScenarios":"Thrown at lib/matplotlib/backend_bases.py:1933 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b379c1b69e012b142c0f496a52bcb30513802d72","analyzedAt":"2026-08-21T23:31:55.468Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}