Trying
import matplotlib.pyplot as plt
fig = plt.figure()
yields
Traceback (most recent call last): File "", line 1, in File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 423, in figure **kwargs) File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 79, in new_figure_manager return new_figure_manager_given_figure(num, figure) File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 87, in new_figure_manager_given_figure window = Tk.Tk() File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1767, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
Never encountered this error before. Right now I'm on a windows machine (at home) accessing a ubuntu machine (at work) via ssh. Could this be the reason for the error? matplotlib is of course completely installed on the ubuntu machine at work.