Skip to content

Commit f0a3a09

Browse files
committed
Only rotate the subsection of the Path
Closes matplotlib#27062 The code for rotation had referred to the original path, when it should only be rotating the connected segment, which had already been extracted.
1 parent b2027c3 commit f0a3a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def _split_path_and_get_label_rotation(self, path, idx, screen_pos, lw, spacing=
383383
# If the path is closed, rotate it s.t. it starts at the label.
384384
is_closed_path = codes[stop - 1] == Path.CLOSEPOLY
385385
if is_closed_path:
386-
cc_xys = np.concatenate([xys[idx:-1], xys[:idx+1]])
386+
cc_xys = np.concatenate([cc_xys[idx:-1], cc_xys[:idx+1]])
387387
idx = 0
388388

389389
# Like np.interp, but additionally vectorized over fp.

0 commit comments

Comments
 (0)