millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

matplotlib does not show plots #685

Closed sam-s closed 4 years ago

sam-s commented 4 years ago

with

%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np

x = np.array([1, 3, 5, 7])
y = np.array([ 6, 3, 9, 5 ])
plt.plot(x, y, 'o')
plt.show()

I see the plot in the browser but not in Emacs

kampango commented 4 years ago

In my case, I see the plot in Emacs by setting ein:output-area-inlined-images to true.

Try to put below line into your init.el file.

(setq ein:output-area-inlined-images t)

https://github.com/millejoh/emacs-ipython-notebook/blob/0e6877cdc25a7a739b1f7299871950fbf18da928/lisp/ein-output-area.el#L32