-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Close figures before plotting #3168
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
base: main
Are you sure you want to change the base?
Clos F440 e figures before plotting #3168
Conversation
…d plots. This commit changes behavior from only closing figures when `showfigures=False` to always closing figures before plotting. Addressing feature request DeepLabCut#3164.
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.
Pull request overview
This PR modifies the PlottingResults function to close all matplotlib figures before creating new plots, addressing feature request #3164. Previously, figures were only closed when showfigures=False; now they are always closed at the start of the function to prevent figure accumulation.
Key Changes:
- Always close figures before plotting (regardless of
showfiguresparameter) - Simplified end-of-function logic to only show figures when requested
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@MMathisLab, this PR is a matter of design choice / preferred behavior for the
Both are valid options. |
Closing all plots before plotting new ones. This avoids overflowing the screen with old plots.
This commit changes behavior from only closing figures when
showfigures=Falseto always closing figures before plotting. Addresses feature request #3164.