Skip to content

Commit e050c46

Browse files
committed
FIX
1 parent 53bc4c2 commit e050c46

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/matplotlib/path.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,13 +999,14 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False, wrap=True):
999999
# errors, but don't try to expand existing 0 range.
10001000
if theta2 != theta1 and eta2 <= eta1:
10011001
eta2 += 360
1002+
print('Added')
1003+
print('Eta1, Eta2', eta1, eta2)
10021004
else:
10031005
eta2 = theta2
10041006
eta1, eta2 = np.deg2rad([eta1, eta2])
1005-
10061007
# number of curve segments to make
10071008
if n is None:
1008-
if np.abs(eta2 - eta1) <= 2 * np.pi:
1009+
if np.abs(eta2 - eta1) <= 2 * np.pi + 1e-12:
10091010
# this doesn't need to grow exponentially, but we have left
10101011
# this way for back compatibility
10111012
n = int(2 ** np.ceil(2 * np.abs(eta2 - eta1) / np.pi))

lib/matplotlib/tests/test_path.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ def test_full_arc(offset):
471471
high = 360 + offset
472472

473473
path = Path.arc(low, high)
474+
print(path.vertices)
474475
mins = np.min(path.vertices, axis=0)
475476
maxs = np.max(path.vertices, axis=0)
476477
np.testing.assert_allclose(mins, -1)

0 commit comments

Comments
 (0)