Seite 1 von 1

jupyter notebook pylab inline plots matplotlib backend Qt5Agg

Verfasst: Freitag 7. Juli 2023, 10:40
von Krischu
Plattform: macBookPro, macOS, Firefox

Ich rufe gerade ein jupyter notebook auf, das noch die plots des letzten Laufs in line anzeigt. Jetzt lösche ich den output und
auf einmal öffnen sich die Plots in einem extra hochpoppenden QT5-Fenster. QT schließe ich daraus, daß folgende Meldung erscheint:

Code: Alles auswählen

%pylab inline
%pylab --no-import-all

#

    
werte=[0,4.5,14,45,77,84.5,57,45,40.5,37,33,29.5,24.5,20.4,15,8.2 ]
print(werte)
print(len(werte))

###
x = np.linspace(0, 20, 16)  
y = werte

pylab.plot(x, y)

Code: Alles auswählen

Populating the interactive namespace from numpy and matplotlib
Using matplotlib backend: Qt5Agg
Populating the interactive namespace from numpy and matplotlib
Wie kann ich bewirken, daß die Plots wieder inline im Notebook erscheinen?


EDIT: erledigt. Konnte es selber lösen:

Code: Alles auswählen

#%pylab
#%pylab --no-import-all
%matplotlib inline
from pylab import *
#

    
werte=[0,4.5,14,45,77,84.5,57,45,40.5,37,33,29.5,24.5,20.4,15,8.2 ]
print(werte)
print(len(werte))

###
pi=np.pi
x = np.linspace(0, 20, 16)  
y = werte

pylab.plot(x, y)