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

Matplotlib backend configuration #5

Open
tovrstra opened this issue May 22, 2019 · 3 comments
Open

Matplotlib backend configuration #5

tovrstra opened this issue May 22, 2019 · 3 comments

Comments

@tovrstra
Copy link
Member

In some scenario's (not sure which), usage of matplotlib on macos with the default backend leads to non-obvious errors. See for example:

https://travis-ci.com/theochem/tinydft/jobs/200737929#L297
theochem/tinydft#1

This is solved in chemtools with the following line:

matplotlib.use('agg')

The problem with this solution is that it makes it impossible to use plt.show to pop up a windows with a plot.

The ideal solution would be to figure out how to install matplotlib on macos, such that the default backend works.

This is the corresponding matplotlib issue: matplotlib/matplotlib#13096 (It is closed??)

This is the corresponding conda issue: ContinuumIO/anaconda-issues#10554

@tovrstra
Copy link
Member Author

The problem is fixed in matplotlib-3.1.0, which is at this time not available yet on conda.

@tovrstra
Copy link
Member Author

Essentially, the line matplotlib.use('agg') can be removed from chemtools. It would be better for end users not to have it. Just keep in mind that travis and others need to be configured to run with the agg backend, e.g. as is done here:

https://github.com/theochem/tinydft/blob/master/.roberto.yaml#L27-L29

@tovrstra
Copy link
Member Author

Matplotlib in conda just got updated to 3.1.0, so the default backend should be fine again for conda users.

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

1 participant