Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified axes patch will not re-clip artists #4788

Closed
QuLogic opened this issue Jul 25, 2015 · 4 comments · Fixed by #4920
Closed

Modified axes patch will not re-clip artists #4788

QuLogic opened this issue Jul 25, 2015 · 4 comments · Fixed by #4920

Comments

@QuLogic
Copy link
Member

QuLogic commented Jul 25, 2015

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 Artists 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 same Path object, but just changes the underlying vertices/codes. I don't see that Path provides an easy way to do so though.
  • Add a TransformedPatch analogue to TransformedPath.

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.)

@tacaswell
Copy link
Member

attn @mdboom

@WeatherGod
Copy link
Member

Could this also explain the recent report for Basemap of the pcolormesh not
getting clipped to the stereographic projection patch?
On Jul 25, 2015 2:25 PM, "Thomas A Caswell" notifications@github.com
wrote:

attn @mdboom https://github.com/mdboom


Reply to this email directly or view it on GitHub
#4788 (comment)
.

@QuLogic
Copy link
Member Author

QuLogic commented Aug 14, 2015

I'm not too sure that Basemap sets an axes patch at all.

@WeatherGod
Copy link
Member

Turns out the Basemap issue was a user error.

On Fri, Aug 14, 2015 at 3:00 AM, Elliott Sales de Andrade <
notifications@github.com> wrote:

I'm not too sure that Basemap sets an axes patch at all.


Reply to this email directly or view it on GitHub
#4788 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants