Skip to content

Commit 95b85ae

Browse files
committed
MNT: apply no-op exit for non-visible artists
1 parent d1e2a20 commit 95b85ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/patches.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,8 @@ def draw(self, renderer):
16471647
"""
16481648
if not hasattr(self, 'axes'):
16491649
raise RuntimeError('Arcs can only be used in Axes instances')
1650+
if not self.get_visible():
1651+
return
16501652

16511653
self._recompute_transform()
16521654

@@ -1661,7 +1663,6 @@ def theta_stretch(theta, scale):
16611663
y = np.sin(theta)
16621664
stheta = np.rad2deg(np.arctan2(scale * y, x))
16631665
# arctan2 has the range [-pi, pi], we expect [0, 2*pi]
1664-
16651666
return (stheta + 360) % 360
16661667

16671668
theta1 = self.theta1

0 commit comments

Comments
 (0)