Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

FIX: fully invalidate TransformWrapper parents before swapping#25126

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anntzer merged 1 commit intomatplotlib:mainfromtacaswell:fix_lines_change_scale
Feb 2, 2023

Conversation

tacaswell
Copy link
Member

PR Summary

The issue is that TransformedPath only regenerates its cache for changes to the non-affine part of the transform. When TransformWrapper for tranScale changes from log -> linear the non-affine part of the log transform is still cached, but when the transforms are invalidated after switching to linear the invalidation only reports changing the affine part so the cache in TransformedPath escapes being updated (nulled out in this case) and when we re-draw with linear is drawing the line off screen (or at least clipped).

This change invalidates all of the parents before changing the internals of TransformWrapper before we switch it which will cause the non-affine part to be correctly recomputed the next time we need it.

closes#25124

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

The issue is that TransformedPath only regenerates its cache for changes to thenon-affine part of the transform.  When TransformWrapper for tranScale changesfrom log -> linear the non-affine part of the log transform is still cached,but when the transforms are invalidated after switching to linear theinvalidation only reports changing the affine part so the cache inTransformedPath escapes being updated (nulled out in this case) and when were-draw with linear is drawing the line off screen (or at least clipped).This change invalidates all of the parents before changing the internals ofTransformWrapper before we switch it which will cause the non-affine part to becorrectly recomputed the next time we need it.closesmatplotlib#25124
@tacaswelltacaswell added this to thev3.7.0 milestoneFeb 1, 2023
@tacaswell
Copy link
MemberAuthor

also, like 2 hours of debugging to change 1 line of code 🤣

@anntzeranntzer merged commita046ee3 intomatplotlib:mainFeb 2, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestFeb 2, 2023
@tacaswelltacaswell deleted the fix_lines_change_scale branchFebruary 2, 2023 22:02
tacaswell added a commit that referenced this pull requestFeb 3, 2023
…126-on-v3.7.xBackport PR#25126 on branch v3.7.x (FIX: fully invalidate TransformWrapper parents before swapping)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

[Bug]: ax.plot(x,y) disappears after changing y_scale
3 participants
@tacaswell@anntzer@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp