Skip to content

Commit 6a3157e

Browse files
committed
minor fixes
1 parent 855641d commit 6a3157e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

doc/users/next_whats_new/axline_setters.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Axline setters and getters
22
--------------------------
3-
The returned object from ``Axes.axline`` now supports getter and setter
3+
4+
The returned object from `.axes.Axes.axline` now supports getter and setter
45
methods for its *xy1*, *xy2* and *slope* attributes:
56

67
.. code-block:: python

lib/matplotlib/lines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ def set_xy1(self, x, y):
15621562
15631563
Parameters
15641564
----------
1565-
x, y : (float, float)
1565+
x, y : float
15661566
Points for the line to pass through.
15671567
"""
15681568
self._xy1 = x, y
@@ -1573,7 +1573,7 @@ def set_xy2(self, x, y):
15731573
15741574
Parameters
15751575
----------
1576-
x, y : (float, float)
1576+
x, y : float
15771577
Points for the line to pass through.
15781578
"""
15791579
if self._slope is None:

lib/matplotlib/tests/test_lines.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ def test_axline_setters():
429429
assert line2.get_xy2() == (.6, .8)
430430
# Testing setting xy2 and slope together.
431431
# These test should raise a ValueError
432-
with pytest.raises(ValueError, match="Cannot set an 'xy2' value while "
433-
"'slope' is set"):
432+
with pytest.raises(ValueError,
433+
match="Cannot set an 'xy2' value while 'slope' is set"):
434434
line1.set_xy2(.2, .3)
435435

436-
with pytest.raises(ValueError, match="Cannot set a 'slope' value while "
437-
"'xy2' is set"):
436+
with pytest.raises(ValueError,
437+
match="Cannot set a 'slope' value while 'xy2' is set"):
438438
line2.set_slope(3)

0 commit comments

Comments
 (0)