python - matplotlib pyplot Invalid DISPLAY variable -
while importing , attempting following:
import matplotlib matplotlib import pyplot plt plt.plot([1,2,3],[1,4,9]) plt.show()
i following error. how fix? running python 2.7, , notebook version 4.1.0. thank you.
runtimeerror: invalid display variable
when running jupyter notebook on server, server may not able display plot. usual solution use non-interactive backend. in case of jupyter notebook done adding
%matplotlib inline
at top of notebook, such graphics shown png images.
Comments
Post a Comment