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

DM-37174: Close opened matplotlib figures in analysis_tools #98

Merged
merged 1 commit into from May 11, 2023

Conversation

leeskelvin
Copy link
Contributor

No description provided.

@leeskelvin leeskelvin marked this pull request as draft May 9, 2023 21:07
@leeskelvin leeskelvin marked this pull request as ready for review May 9, 2023 23:08
@leeskelvin leeskelvin force-pushed the tickets/DM-37174 branch 3 times, most recently from fe51783 to d1354c2 Compare May 10, 2023 15:30
@leeskelvin leeskelvin merged commit d64c808 into main May 11, 2023
7 checks passed
@leeskelvin leeskelvin deleted the tickets/DM-37174 branch May 11, 2023 02:15
# TODO: This rcParams modification is a temporary solution, hiding
# a matplotlib warning indicating too many figures have been opened.
# When DM-39114 is implemented, this should be removed.
plt.rcParams.update({"figure.max_open_warning": 0})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leeskelvin do you happen to remember your rationale behind including this line inside runQuantum instead of at the module level or class level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed like the best place for such a catch-all config at the time, however, I'm not beholden to it. Is it causing issues elsewhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues yet, but this method is overridden in a few tasks and they miss this. I think because they are an exception instead of the norm, it doesn't lead to too many open figures but I figured it might be best places elsewhere. I'm working on a ticket that generalizes this method further and can move it on that ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants