#! ./bin/python # encoding:utf-8 import matplotlib.pyplot as plt import numpy as np def plot_normal_parabel(): # Erzeuge Datenpunkte für x-Werte von -10 bis 10 x = np.linspace(-3, 3, 100) # Berechne die y-Werte für die Normalparabel y = x**2 # Erstelle das Diagramm plt.plot(x, y, label='Normalparabel: $y=x^2$') # Beschriftungen und Titel hinzufügen plt.xlabel('x-Achse') plt.ylabel('y-Achse') plt.title('Normalparabel') # Legende hinzufügen plt.legend() # Funktion aufrufen, um die Normalparabel zu zeichnen plot_normal_parabel() # Diagramm anzeigen plt.grid(True) plt.show()