MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / format_coord

Method format_coord

lib/mpl_toolkits/mplot3d/axes3d.py:1623–1638  ·  view source on GitHub ↗

Return a string giving the current view rotation angles, or the x, y, z coordinates of the point on the nearest axis pane underneath the mouse cursor, depending on the mouse button pressed.

(self, xv, yv, renderer=None)

Source from the content-addressed store, hash-verified

1621 return val
1622
1623 def format_coord(self, xv, yv, renderer=None):
1624 """
1625 Return a string giving the current view rotation angles, or the x, y, z
1626 coordinates of the point on the nearest axis pane underneath the mouse
1627 cursor, depending on the mouse button pressed.
1628 """
1629 coords = ''
1630
1631 if self.button_pressed in self._rotate_btn:
1632 # ignore xv and yv and display angles instead
1633 coords = self._rotation_coords()
1634
1635 elif self.M is not None:
1636 coords = self._location_coords(xv, yv, renderer)
1637
1638 return coords
1639
1640 def _rotation_coords(self):
1641 """

Callers 1

test_format_coordFunction · 0.45

Calls 2

_rotation_coordsMethod · 0.95
_location_coordsMethod · 0.95

Tested by 1

test_format_coordFunction · 0.36