Description
This probably doesn't come up too much since most people plot in Cartesian, but I've run into it working on #4699. Artists are only clipped to whatever the patch looked like at the time that the artist was added to the axes. I have tracked down the issue and just want determine the best way forward.
The problem arises from the fact that axes use a Patch
for the background and default clipping definitions while artists use a Path
for actual clipping. To get this Path
, the path and transform are pulled from the Patch
and placed in a TransformedPath
. This is all well and good for Cartesian axes with rectangles, because they're always unit squares where only the transform is changed. But as part of #4699, the PolarAxes
use a Wedge
and every time parameters are changed, a new Path
is calculated. This new Path
has no link to the TransformedPath
used by any existing Artist
s and they end up clipping using some old version. The user could get around this by plotting only after setting all the limits for the axes, but I find that less than ideal.
So the question is how to remedy this issue. I see a couple options:
Wedge
always returns the samePath
object, but just changes the underlying vertices/codes. I don't see thatPath
provides an easy way to do so though.- Add a
TransformedPatch
analogue toTransformedPath
.
That being said, I'm not sure how the clipping path would get informed that the underlying (untransformed) Patch
or Path
was modified since only Transforms
have that invalidation code (or maybe I missed something for it.)