Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Modified axes patch will not re-clip artists #4788

Copy link
Copy link
Closed
@QuLogic

Description

@QuLogic
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.