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

Omit blank figure #61

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Omit blank figure #61

merged 2 commits into from
Feb 28, 2025

Conversation

jakubno
Copy link
Member

@jakubno jakubno commented Feb 28, 2025

Description

There are some edge cases, when the code would generate 2 charts and one of them blank. We will simply omit blank charts

From matplotlib docs:

Notes

Saving figures to file and showing a window at the same time

If you want an image file as well as a user interface window, use pyplot.savefig before pyplot.show. At the end of (a blocking) show() the figure is closed and thus unregistered from pyplot. Calling pyplot.savefig afterwards would save a new and thus empty figure. This limitation of command order does not apply if the show is non-blocking or if you keep a reference to the figure and use Figure.savefig.

@jakubno jakubno added the improvement Improvement for current functionality label Feb 28, 2025
@jakubno jakubno requested a review from mlejva February 28, 2025 15:51
@jakubno jakubno self-assigned this Feb 28, 2025
@jakubno jakubno merged commit ae88473 into main Feb 28, 2025
1 check passed
@jakubno jakubno deleted the skip-blank-figure branch February 28, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement for current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants