Matplotlib
Learning outcomes
At the end of this sessions, learners …
understand why Matplotlib is important
have run Python code that uses Matplotlib
Loading Matplotlib
HPC cluster |
How to load Matplotlib |
|---|---|
Alvis |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
Pelle |
|
Tetralith |
|
Exercises
import matplotlib as mpl
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 100)
plt.plot(x, np.sin(x))
plt.plot(x, np.cos(x))
# plt.show()
plt.figure().savefig('my_figure.png') # Unsure if this works