You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove ineffective exclusion of Arcs without parent Axes.
The `if not hasattr(self, 'axes'): raise RuntimeError(...)` check was
ineffectual, as artists now always have an Axes attribute, which can
just be None for some artists. In fact, small Arcs are drawn just fine
without a parent Axes; e.g.
```
from pylab import *
from matplotlib.patches import *
fig = figure()
fig.add_artist(Ellipse((.2, .2), .1, .3, angle=45)) # for comparison
fig.add_artist(Arc((.2, .2), .1, .3, angle=45, theta1=0, theta2=45))
```
works just fine. Remove the check, and adjust the docs accordingly.
On the other hand, large arcs *did* previously fail,
but that occurred a bit further down, when computing
`transforms.BboxTransformTo(self.axes.bbox)` (`self.axes` is None -->
AttributeError). Fix that by using the figure bbox in that case (as the
point is to limit the drawing to the unclipped area, which is the whole
figure for Arcs without a parent Axes).
0 commit comments