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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -