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

[Minor] GUI for matplotlib to run examples #323

Merged

Conversation

mvargas33
Copy link
Contributor

If you try to run the examples on a fresh virtual environment, no figure will be shown and you will end up with the following error:

UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

I propose to add pyqt5 to 'demo' dependencies. This is a package with a GUI that works for matplotlib. This solves the issue.

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

LGTM

@bellet
Copy link
Member

bellet commented Sep 14, 2021

Thanks @mvargas33. I am not quite familiar with these GUI aspects and their potential dependencies. Perhaps @perimosocordiae can validate as well

@perimosocordiae
Copy link
Contributor

I don't think we need to specify QT as a dependency here, there are several matplotlib backends that should all work reasonably well and I wouldn't want to make users download the QT backend if they aren't going to use it.

Maybe the best change here is a comment in the demo noting that a graphical matplotlib backend is recommended.

@mvargas33 mvargas33 changed the title GUI for matplotlib to run examples [Minor] GUI for matplotlib to run examples Nov 9, 2021
@mvargas33
Copy link
Contributor Author

I followed @perimosocordiae recommendation and added a note in the docs for sandwich and algorithms walkthrough instead. That should be enough.

@perimosocordiae perimosocordiae merged commit a797635 into scikit-learn-contrib:master Nov 11, 2021
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

4 participants