I create a virtual server using compute engine. I can ssh through their ssh button. But when I run my code which has matplotlib it will not show the plot while I am not getting any error! here is my code for matplotlib:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.plot(history.history['loss'], label='train')
plt.plot(history.history['val_loss'], label='test')
plt.legend()
plt.show()
when I run echo $DISPLAY
it returns nothing and then I run export DISPLAY=localhost:0
but still pyplot is not working. Is it possible to show it at all on GCE? or I am doing s.th wrong!