added plot title
This commit is contained in:
+6
-6
@@ -63,14 +63,13 @@ def fd(rho: float, velocity_kmh: float, c_val: float, area: float):
|
||||
return res
|
||||
|
||||
|
||||
plot.figure()
|
||||
|
||||
# Fd vs. velocity, param: temperature
|
||||
temps_list = [-20, -10, 0, 10, 20, 30]
|
||||
vel_list = [20, 40, 60, 80, 100, 120, 130, 140, 160]
|
||||
reference = fd(rho(20), 100, c_val_id3, area_id3)
|
||||
temps_list_leg = [f"{t}°C" for t in temps_list]
|
||||
|
||||
plot.figure()
|
||||
for temp_degc in temps_list:
|
||||
rho_t = rho(temp_degc)
|
||||
y_fd = []
|
||||
@@ -80,13 +79,12 @@ for temp_degc in temps_list:
|
||||
|
||||
plot.plot(vel_list, y_fd)
|
||||
|
||||
plot.ylabel("Wind-Widerstand [%]")
|
||||
plot.title("Windwiderstand vs Geschwindigkeit")
|
||||
plot.ylabel("Windwiderstand [%]")
|
||||
plot.xlabel("Geschwindigkeit [km/h]")
|
||||
plot.legend(temps_list_leg)
|
||||
plot.grid()
|
||||
|
||||
plot.figure()
|
||||
|
||||
# Fd vs. velocity, param: car
|
||||
temp = 20
|
||||
vel_list = [20, 40, 60, 80, 100, 120, 130, 140, 160]
|
||||
@@ -95,6 +93,7 @@ car_list_leg = [f"{t['car']}" for t in car_list]
|
||||
rho_t = rho(temp)
|
||||
reference = fd(rho_t, 100, c_val_id3, area_id3)
|
||||
|
||||
plot.figure()
|
||||
for car in car_list:
|
||||
y_fd = []
|
||||
for vel_kmh in vel_list:
|
||||
@@ -103,8 +102,9 @@ for car in car_list:
|
||||
|
||||
plot.plot(vel_list, y_fd)
|
||||
|
||||
plot.ylabel("Wind-Widerstand [%]")
|
||||
plot.ylabel("Windwiderstand [%]")
|
||||
plot.xlabel("Geschwindigkeit [km/h]")
|
||||
plot.title("Windwiderstand vs Geschwindigkeit")
|
||||
plot.legend(car_list_leg)
|
||||
plot.grid()
|
||||
plot.show()
|
||||
Reference in New Issue
Block a user