diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 5c17f3f01bec..acaf6328ac49 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1568,6 +1568,12 @@ def set_xy2(self, x, y): """ 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 ---------- x, y : float @@ -1583,6 +1589,12 @@ def set_slope(self, slope): """ Set the *slope* value of the line. + .. note:: + + You can only set *slope* if the line was created using the *slope* + parameter. If the line was created using *xy2*, please use + `~.AxLine.set_xy2`. + Parameters ---------- slope : float