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

Backend selection without $DISPLAY available #2723

Closed
akhmerov opened this issue Jan 12, 2014 · 1 comment
Closed

Backend selection without $DISPLAY available #2723

akhmerov opened this issue Jan 12, 2014 · 1 comment

Comments

@akhmerov
Copy link
Contributor

Availability of $DISPLAY doesn't influence the logic of selecting the default backend. This makes usage of pyplot more involved via ssh and in environments without displays. Right now executing

import os
del os.environ['DISPLAY']
from matplotlib import pyplot
pyplot.plot([0, 1])

Will result in an error. Perhaps a fallback should be used if there is no display available?

@mdboom
Copy link
Member

mdboom commented Jan 12, 2014

The default backend is selected at compile time, not at run time. I think it would actually be more confusing if the backend were selected through some automated mechanism (i.e. when in doubt, don't guess). The backend can be selected manually using the matplotlibrc, and Agg will work without a DISPLAY.

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