Matplotlib issue
Closed this issue · 3 comments
hasindu2008 commented
Do you have any idea what causes this issue? Happened when I compiled on Ubuntu 16 for aarch64 and running on 18.
Traceback (most recent call last):
File "/storage/tmp/interartic_bin/scripts/covarPlots.py", line 324, in <module>
main()
File "/storage/tmp/interartic_bin/scripts/covarPlots.py", line 113, in main
cov1x=cov1x, cov1y=cov1y, cov2x=cov2x, cov2y=cov2y)
File "/storage/tmp/interartic_bin/scripts/covarPlots.py", line 253, in plot
fig, ax = plt.subplots()
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper
return func(*args, **kwargs)
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/pyplot.py", line 1287, in subplots
fig = figure(**fig_kw)
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/pyplot.py", line 693, in figure
**kwargs)
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
return _backend_mod.new_figure_manager(*args, **kwargs)
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
window = tk.Tk(className="matplotlib")
File "/storage/tmp/interartic_bin/artic_bin/lib/python3.6/tkinter/__init__.py", line 2023, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:12.0"
Psy-Fer commented
That to me looks like an environment problem.
Looks like it should solve it.
Otherwise, I can force it to not have the interactive mode part (which isn't needed anyway) and force it to use agg with
matplotlib.use('Agg')
If the first solution isn't viable, let me know, and i'll modify the code.
Psy-Fer commented
Is this still an issue?
hasindu2008 commented
Yes. We should get rid of this xwindow thing.