I am trying to create a plot on a remote machine using pyplot and I get the following exception _tkinter.TclError: no display name and no $DISPLAY environment variable. Before import matplotlib.pyplot as plt, I do
import matplotlib
matplotlib.use('Agg')
However, it does not solve the issue. The exception is thrown when fig = plt.figure() is being executed. Could you please help me with this problem? Thank you very much.
PS. I access the remote machine via ssh -X ....
