Set the mouse buttons for 3D rotation and zooming. Parameters ---------- rotate_btn : int or list of int, default: 1 The mouse button or buttons to use for 3D rotation of the Axes. pan_btn : int or list of int, default: 2 The mouse bu
(self, rotate_btn=1, pan_btn=2, zoom_btn=3)
| 1485 | return M |
| 1486 | |
| 1487 | def mouse_init(self, rotate_btn=1, pan_btn=2, zoom_btn=3): |
| 1488 | """ |
| 1489 | Set the mouse buttons for 3D rotation and zooming. |
| 1490 | |
| 1491 | Parameters |
| 1492 | ---------- |
| 1493 | rotate_btn : int or list of int, default: 1 |
| 1494 | The mouse button or buttons to use for 3D rotation of the Axes. |
| 1495 | pan_btn : int or list of int, default: 2 |
| 1496 | The mouse button or buttons to use to pan the 3D Axes. |
| 1497 | zoom_btn : int or list of int, default: 3 |
| 1498 | The mouse button or buttons to use to zoom the 3D Axes. |
| 1499 | """ |
| 1500 | self.button_pressed = None |
| 1501 | # coerce scalars into array-like, then convert into |
| 1502 | # a regular list to avoid comparisons against None |
| 1503 | # which breaks in recent versions of numpy. |
| 1504 | self._rotate_btn = np.atleast_1d(rotate_btn).tolist() |
| 1505 | self._pan_btn = np.atleast_1d(pan_btn).tolist() |
| 1506 | self._zoom_btn = np.atleast_1d(zoom_btn).tolist() |
| 1507 | |
| 1508 | def disable_mouse_rotation(self): |
| 1509 | """Disable mouse buttons for 3D rotation, panning, and zooming.""" |
no outgoing calls
no test coverage detected