Matplotlib example¶
Matplotlib displays data in figures, that is, windows, Jupyter widgets, etc., each of which can contain one or more axes. The easiest way to create a figure with axes is to use pyplot.subplots
and then specify some data with Axes.plot
.
Import
[1]:
import matplotlib.pyplot as plt
Create figure with axes
[2]:
fig, ax = plt.subplots()

Einige Daten auf den Achsen zeichnen
[3]:
fig, ax = plt.subplots()
ax.plot([1, 2, 3, 4], [1, 4, 2, 3])
[3]:
[<matplotlib.lines.Line2D at 0x11b315350>]
