From 6a266ebee1859f532760aec8613e09bf5c7b3c56 Mon Sep 17 00:00:00 2001 From: git-sandro Date: Tue, 28 Oct 2025 21:40:49 +0100 Subject: [PATCH] aufgabenblatt_5_3.py created --- aufgabenblatt_5_3.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 aufgabenblatt_5_3.py diff --git a/aufgabenblatt_5_3.py b/aufgabenblatt_5_3.py new file mode 100644 index 0000000..3491794 --- /dev/null +++ b/aufgabenblatt_5_3.py @@ -0,0 +1,28 @@ +#%% +import numpy as np +import matplotlib.pyplot as plt +import matplotlib as mpl + +# Konfigurieren +mpl.rcParams["font.size"] = 20 +mpl.rcParams["font.family"] = "serif" + +def plot(x, y, label): + plt.figure(1) + plt.plot(x, y, linewidth = 3, label = label) + plt.xlabel(r"$x$") + plt.ylabel(r"$y$") + plt.legend() + plt.grid(visible=True) + plt.axis("image") + +def main(): + # Daten + x = np.linspace(0, 2, 203) + y = 0.4 * x + 1 + + plot(x, y, r"$y = {0.4x+1}$") + +if __name__ == "__main__": + main() +# %%