Seite 1 von 1

Matplotlib navigation Toolbar Jupyter

Verfasst: Montag 15. Juni 2020, 12:16
von Tobias74
Hallo,
kann mir jemand sagen, wie ich im jupyter Notebook die Navigation toolbar für eine Matplotlib Grafik erhalte?

https://matplotlib.org/3.2.1/users/navi ... olbar.html

Laut Dokumentation sollte die Toolbar beim Erzeugen automatisch angezeigt werden.

Viele Grüße

Re: Matplotlib navigation Toolbar Jupyter

Verfasst: Montag 15. Juni 2020, 15:06
von tonikae

Code: Alles auswählen

%matplotlib notebook
# %matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
fig, axes = plt.subplots(1, figsize=(8, 3))
plt.plot([i for i in range (10)],np.random.randint(10, size=10))     
plt.show()
Zu beachten sind die ersten beiden Zeilen.
d.h. %matplotlib notebook ist Anzeige mit Toolbar
und %matplotlib inline ist Anzeige ohne Toolbar (hier auskommentiert)

Hoffe damit weitergeholfen zu haben.