Set the *xy2* value of the line. .. note:: You can only set *xy2* if the line was created using the *xy2* parameter. If the line was created using *slope*, please use `~.AxLine.set_slope`. Parameters ---------- xy2 : tup
(self, *args, **kwargs)
| 1599 | self._xy1 = xy1 |
| 1600 | |
| 1601 | def set_xy2(self, *args, **kwargs): |
| 1602 | """ |
| 1603 | Set the *xy2* value of the line. |
| 1604 | |
| 1605 | .. note:: |
| 1606 | |
| 1607 | You can only set *xy2* if the line was created using the *xy2* |
| 1608 | parameter. If the line was created using *slope*, please use |
| 1609 | `~.AxLine.set_slope`. |
| 1610 | |
| 1611 | Parameters |
| 1612 | ---------- |
| 1613 | xy2 : tuple[float, float] |
| 1614 | Points for the line to pass through. |
| 1615 | """ |
| 1616 | if self._slope is None: |
| 1617 | params = _api.select_matching_signature([ |
| 1618 | lambda self, x, y: locals(), lambda self, xy2: locals(), |
| 1619 | ], self, *args, **kwargs) |
| 1620 | if "x" in params: |
| 1621 | _api.warn_deprecated("3.10", message=( |
| 1622 | "Passing x and y separately to AxLine.set_xy2 is deprecated since " |
| 1623 | "%(since)s; pass them as a single tuple instead.")) |
| 1624 | xy2 = params["x"], params["y"] |
| 1625 | else: |
| 1626 | xy2 = params["xy2"] |
| 1627 | self._xy2 = xy2 |
| 1628 | else: |
| 1629 | raise ValueError("Cannot set an 'xy2' value while 'slope' is set;" |
| 1630 | " they differ but their functionalities overlap") |
| 1631 | |
| 1632 | def set_slope(self, slope): |
| 1633 | """ |
no outgoing calls