%matplotlib inline not working

It isn’t matplotlib because related code (see below) works fine with 3.10.5 at the first link I suggested trying in the related thread. That session was running Python v3.12.8.


That code has syntax errors. I don’t is your local settings or not using Block code formatting?

I used:

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

t = np.arange(0,1,0.01)
y = np.sin(2*np.pi*t)

plt.figure()
plt.plot(t,y)

However, that still seems overly not as simple as it can/should be these days. (Aside from the obvious that %matplotlib inline is the default and unnecessary these days.) Why the plt.figure() that has no settings and doesn’t get used. When you say, “but plots are not being displayed”. Does it always have that and is there maybe space it is trying to display that and blocking display of the unassigned, later plot?

Maybe please use GitHub gists to share?
Example previously-run notebook rendered via nbviewer. (Source notebook actually stored as Gihub gist , at which nbviewer was pointed.)
This may help also see if some output is in the notebook that you say isn’t displaying the expected plot?