0
votes

NOT DUPLICATE OF How to make IPython notebook matplotlib plot inline
I tried restarting kernel, using both %matplotlib inline twice/once ,and %matplotlib notebook twice/once, no change.

Reinstalled anaconda, tried plt.show(); (; at end) as well, no change.

plt.savefig("test.png")

saves graph picture beautifully, so it works in the backend.

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

t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2*np.pi*t)
plt.plot(t, s)

plt.show()

With %matplotlib notebook it displays a big blank, but hovering my mouse over displays the coordinates in the bottom right corner.

I have Windows 10, Python is 3.7.3, matplotlib 3.1.0, ipykernel 5.1.1, ipython 6.5.0, Jupyter Notebook server 6.0.0.

when using %matplotlib notebook, I can interact with it, so hovering my mouse over it displays the x and y coordinates on the bottom right corner %matplotlib notebook twice

1
Can you show an attempt where you use %matplotlib notebook twice. this is how it should look like, and it does work as expected. If it doesn't for you, you may need to provide more information about your libraries and system. - ImportanceOfBeingErnest
It works as expected for me. - vb_rises
What exactly should I check about the libraries? - Chris
For example my result was produced with python 3.6.6, juypter notebook server 5.6, IPython 6.5.0, ipykernel 5.1.0 and matplotlib 3.1.0, with the notebook running in Firefox 68 on a windows 8.1 computer. - ImportanceOfBeingErnest
Python is 3.7, matplotlib 3.1, ipykernel 5.1.1, ipython 7.6.1, jupyter 1.0, jupyter-client 5.3.1. Dont see any jupyter notebook server package explicitly - Chris

1 Answers

0
votes

I was using Internet Explorer. Opened same Jupyter workbook in Edge, and it works!