We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Headless plotting is not implemented; currently requires X11 forwarding if running on a server.
Traceback (most recent call last): File "prorad.py", line 734, in <module> main() File "prorad.py", line 78, in main plot_results(grid, film_x, film_y, Ep, traces, plot_fluence=True, plot_traces=True, plot_quiver=False, save_images=True) File "prorad.py", line 665, in plot_results fig = plt.figure(2,figsize=(8,8)) File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/pyplot.py", line 535, in figure **kwargs) File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager return new_figure_manager_given_figure(num, figure) File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure window = Tk.Tk() File "/software/python-2.7.12-el7-x86_64/lib/python2.7/lib-tk/Tkinter.py", line 1815, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: couldn't connect to display "localhost:16.0"
This could be corrected using the matplotlib 'Agg' plotter, which would also suppress GUI popups. I'll see about pushing a change.
The text was updated successfully, but these errors were encountered:
I confirmed that this issue can be fixed by editing the prorad.py header:
Before (X11 required):
... import matplotlib.pyplot as plt ...
After (headless plotting):
... import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt ...
Sorry, something went wrong.
One way of having this detected automatically (in Unix platforms at least) is to do :
import matplotlib as mpl import os if not os.environ.has_key('DISPLAY'): mpl.use('Agg') import matplotlib.pyplot as plt
Best, Mathieu
No branches or pull requests
Headless plotting is not implemented; currently requires X11 forwarding if running on a server.
This could be corrected using the matplotlib 'Agg' plotter, which would also suppress GUI popups. I'll see about pushing a change.
The text was updated successfully, but these errors were encountered: