Matplotlib example#

This notebook demonstrates the use of matplotlib in a Jupyter dashboard.

  1. To run it, click on CellRun All in the Notebook menu.

  2. Then you can use ViewDashboard-Preview to view the diagram in the Report Layout.

  3. In ViewDashboard LayoutGrid Layout you can also display the plot in the Grid Layout.

[1]:
%matplotlib notebook
[2]:
import matplotlib.pyplot as plt
import numpy as np
[3]:
x = np.linspace(0, 2*np.pi, 2000)
y = np.sin(x)
[4]:
fig, ax = plt.subplots(figsize=(5,3.5))
ax.plot(x, y)
plt.tight_layout()