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

BUG: abg_python leaks Matplotlib configuration (side effects at import time) #5

Closed
neutrinoceros opened this issue Jan 27, 2024 · 2 comments

Comments

@neutrinoceros
Copy link
Contributor

This was discovered as the root cause of yt-project/yt#4785, see in particular yt-project/yt#4785 (comment)

Showcasing culprit lines:

plt.rcParams['figure.dpi'] = 120
plt.rcParams['figure.facecolor'] = 'white'

This one also has potentially undesirable side effects at import time (though it was never a problem in yt's CI, it could create issues for firefly users that could be pretty hard to debug)

matplotlib.use("Agg")

I've tried simply dropping these three lines, which didn't break any tests from the package, so I assume they are actually disposable, but I don't know why they were added in the first place so let me know if that solution doesn't work for you.

@agurvich
Copy link
Owner

Hey @neutrinoceros , so sorry for this... These lines were put in to save me trouble setting them for copying plots into slack for my thesis advisor. God willing, these lines will never be necessary again :')

@agurvich
Copy link
Owner

merged and uploaded 1.1.5 to pypi... hopefully that gets the CI back on track. thanks @neutrinoceros !

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

No branches or pull requests

2 participants