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

Method set_data

lib/matplotlib/patches.py:1568–1606  ·  view source on GitHub ↗

Set `.FancyArrow` x, y, dx, dy, width, head_with, and head_length. Values left as None will not be updated. Parameters ---------- x, y : float or None, default: None The x and y coordinates of the arrow base. dx, dy : float or None, defa

(self, *, x=None, y=None, dx=None, dy=None, width=None,
                 head_width=None, head_length=None)

Source from the content-addressed store, hash-verified

1566 super().__init__(self.verts, closed=True, **kwargs)
1567
1568 def set_data(self, *, x=None, y=None, dx=None, dy=None, width=None,
1569 head_width=None, head_length=None):
1570 """
1571 Set `.FancyArrow` x, y, dx, dy, width, head_with, and head_length.
1572 Values left as None will not be updated.
1573
1574 Parameters
1575 ----------
1576 x, y : float or None, default: None
1577 The x and y coordinates of the arrow base.
1578
1579 dx, dy : float or None, default: None
1580 The length of the arrow along x and y direction.
1581
1582 width : float or None, default: None
1583 Width of full arrow tail.
1584
1585 head_width : float or None, default: None
1586 Total width of the full arrow head.
1587
1588 head_length : float or None, default: None
1589 Length of arrow head.
1590 """
1591 if x is not None:
1592 self._x = x
1593 if y is not None:
1594 self._y = y
1595 if dx is not None:
1596 self._dx = dx
1597 if dy is not None:
1598 self._dy = dy
1599 if width is not None:
1600 self._width = width
1601 if head_width is not None:
1602 self._head_width = head_width
1603 if head_length is not None:
1604 self._head_length = head_length
1605 self._make_verts()
1606 self.set_xy(self.verts)
1607
1608 def _make_verts(self):
1609 if self._head_width is None:

Callers

nothing calls this directly

Calls 2

_make_vertsMethod · 0.95
set_xyMethod · 0.45

Tested by

no test coverage detected