import matplotlib.pyplot as plt # Erzeugung von Daten tage = list(range(1,9)) celsius_min = [19.6, 24.1, 26.7, 28.3, 27.5, 30.5, 32.8, 33.1] celsius_max = [24.8, 28.9, 31.3, 33.0, 34.9, 35.6, 38.4, 39.2] # Achsenbeschriftung plt.xlabel('Tag') plt.ylabel('Grad Celsius') # Plots erstellen plt.plot(tage, celsius_min, "og", label="Min") # Daten, 'o'..Kreis, 'g'..gruen plt.plot(tage, celsius_min, "g--") # Linie, '--'..strichliert plt.plot(tage, celsius_max, "b") plt.plot(tage, celsius_max, "^b", label="Max") # Optional: Min/Max Werte der Achsen veraendern xmin, xmax = 0, 10 ymin, ymax = 0, 42 plt.axis([xmin, xmax, ymin, ymax]) # Optional: Legende einfuegen, label in plt.plot Funktion plt.legend(loc='lower right') # Position der Legende # Zeige Plot (nicht notwendig in Sypder) plt.show()