jupyter notebook pylab inline plots matplotlib backend Qt5Agg

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
Krischu
User
Beiträge: 87
Registriert: Dienstag 14. Januar 2014, 09:07

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)
--
Grüße
Christoph
Antworten