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

Windows 10, DISPLAY, and matplotlib #7

Closed
MattDBailey opened this issue Sep 18, 2020 · 3 comments
Closed

Windows 10, DISPLAY, and matplotlib #7

MattDBailey opened this issue Sep 18, 2020 · 3 comments

Comments

@MattDBailey
Copy link

if os.environ.get('DISPLAY', '') == '':
    print('no display found. Using non-interactive Agg backend')
    mpl.use('Agg')

This throws an error and won't display plots in Windows 10 using Jupyter (due to 'Agg' being non-GUI) unless you order your imports correctly.

This does not work in windows command line. When you run python from cmd, plt.show() opens a window with the plot. However, the DISPLAY key is not defined in the os.environ dict. ..... – Jindra Helcl May 28 '15 at 17:25

So, this is not displaying plots in (Jupyter) using Windows

%matplotlib inline
import matplotlib.pyplot as plt
from dmba import regressionSummary

But this will display plots properly (still showing the error above):

from dmba import regressionSummary
%matplotlib inline
import matplotlib.pyplot as plt
@gedeck
Copy link
Owner

gedeck commented Sep 23, 2020

Thank you for the feedback. I've made a change to avoid the DISPLAY environment variable test on windows and updated the package. As I don't have a windows machine, can you please give it a try?

@MattDBailey
Copy link
Author

Yes, it works without an issue now. Thanks!

@gedeck
Copy link
Owner

gedeck commented Sep 30, 2020

Great, thank you for getting back on this.

@gedeck gedeck closed this as completed Sep 30, 2020
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