Matplotlib backend automatically set as 'Agg' when Catalyst is imported.
See original GitHub issue🐛 Bug Report
matplotlib.use("Agg")
set the backend of catalyst to agg
, which requires user to click to close the visualization window. I think it would be better if it is kept in original matplotlib backend.
please make a test before allowing the pull request.
How To Reproduce
Steps to reproduce the behavior:
- run first script, in PyCharm with Catalyst installed Env.
- run second script, in PyCharm with Catalyst installed Env.
- make comparison
Code sample
import numpy as np
import matplotlib.pyplot as plt
image = np.random.random([800,800,3]) * 255.0
plt.imshow(image)
plt.show()
from catalyst import dl, utils
from catalyst.data import ToTensor
from catalyst.contrib.datasets import MNIST
import numpy as np
import matplotlib.pyplot as plt
image = np.random.random([800,800,3]) * 255.0
plt.imshow(image)
plt.show()
Screenshots
Expected behavior
In pycharm, it supposed that the image should pop up in the SciView window, but after importing catalyst packages, it doesn’t appear, after commenting the matplotlib.use("Agg")
, unexceptional behavior disappeared.
Environment
Additional context
Checklist
- [ x ] bug description
- [ x ] steps to reproduce
- [ x ] expected behavior
- [ x ] environment
- [ x ] code sample / screenshots
FAQ
Please review the FAQ before submitting an issue:
- [ x ] I have read the documentation and FAQ
- [ x ] I have reviewed the minimal examples section
- I have checked the changelog for main framework updates
- [ x ] I have read the contribution guide
- I have joined Catalyst slack (#__questions channel) for issue discussion
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Backends — Matplotlib 3.6.2 documentation
Without a backend explicitly set, Matplotlib automatically detects a usable backend based on what is available on your system and on whether a...
Read more >How can I set the 'backend' in matplotlib in Python?
AGG backend is for writing to file, not for rendering in a window. See the backend FAQ at the matplotlib web site. ImportError:...
Read more >Automatically set a backend if no default backend is ... - GitHub
I think the --no-plot flag is separate but related. This issue should be fixed as stated in the SO post using. import matplotlib...
Read more >Spark SQL, DataFrames and Datasets Guide
Here we include some basic examples of structured data processing using Datasets: Scala; Java; Python; R. // This import is needed to use...
Read more >Cisco Catalyst 9800 Series Configuration Best Practices
Describes best practices for configuring a typical Cisco Catalyst 9800 Series wireless infrastructure, including profiles and tags, controller and access ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
focusing only on plotting, I think it is right. An PR is already made, but not sure if it is hotfix or not.
As MR is already done, This issue is closed now