Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
658 B

#! ./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()