diff --git a/DataPlotter.py b/DataPlotter.py index ab0be5b401acb2dd98cfc479f6e8a870148e452b..42efb5a5b814b42e57b735d62bd0986f46144e4f 100644 --- a/DataPlotter.py +++ b/DataPlotter.py @@ -9,8 +9,8 @@ from matplotlib.colors import ListedColormap from DataHandler import DataHandler, WeatherChangeWindow -# TODO: Adjust input parameters for multiple weather change windows class DataPlotter(DataHandler): + def plotOvertakes(self, overtakesPerLap: list[int], raceName: str, weatherChangeWindows: list[WeatherChangeWindow] = None): # Define variables @@ -24,7 +24,7 @@ class DataPlotter(DataHandler): x_values = np.arange(1, laps + 1) plt.plot(x_values, overtakesPerLap) - # Paint background between first and last tire change + # Paint background for weather change windows for weatherChangeWindow in weatherChangeWindows: axis.axvspan(weatherChangeWindow.firstLap, weatherChangeWindow.lastLap, color='blue', alpha=0.3)