Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Fix SVG rendering error in def update_background#30490
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
Conversation
AasmaGupta commentedAug 29, 2025
i tested the fix using the code below which reproduces the issue and confirms that SVG export no longer crashes: |
fd2cfb4 to3d6e31cCompareQuLogic commentedAug 30, 2025
There is no such thing as |
AasmaGupta commentedAug 30, 2025
I have updated the PR with the issue number and more accurate files and functions to navigate the issue as well as the fix. Hope this makes it easier to navigate and review! |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
tacaswell left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@AasmaGupta Do you feel comfortable squashing this to one commit? IF not we can squash-merge.
Otherwise 👍
AasmaGupta commentedSep 2, 2025
@tacaswell I'm fine with you squash merging it from your end. Thanks! |
0056a47 intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
…490-on-v3.10.xBackport PR#30490 on branch v3.10.x (Fix SVG rendering error in def update_background)
Uh oh!
There was an error while loading.Please reload this page.
Reference issue (if any)
Example: AttributeError: 'FigureCanvasSVG' object has no attribute 'copy_from_bbox'
Fixes#30485
Why is this change necessary?
Saving figures as SVG could crash due to the way
def update_backgroundhandled blitting in thelib/matplotlib/widgets.pyfile. This change prevents that crash.What problem does it solve?
fixes the crash that occurred specifically when exporting plots to SVG format
What is the reasoning for this implementation?
Blitting is meant for interactive updates and isn’t needed when saving static outputs. Skipping it during SVG export prevents the crash while keeping normal interactive behavior intact.
PR checklist