Speed traces give a direct comparison of lap performance between drivers. Overlay the speed profiles of two laps. The overlay shows where one driver is faster. It also shows braking points, acceleration zones, and top speeds.
Telemetry data includes speed, throttle, brake, and more. The add_distance() method adds a cumulative distance column. Use this column to align the laps for comparison.
The native chart accepts the shared filters. The drivers list selects which fastest laps to overlay; the default is the top-2 finishers:
import tif1# Compare any set of driversfig, ax = tif1.plot_speed_traces( 2023, 'Spanish Grand Prix', 'Q', drivers=['VER', 'HAM', 'LEC'], save_path='speed_traces.png', dpi=150,)plt.show()
The whole workflow above is wrapped in a single native function:
import tif1import matplotlib.pyplot as plt# One call: loads the session and overlays each driver's fastest lapfig, ax = tif1.plot_speed_traces(2023, 'Spanish Grand Prix', 'Q', drivers=['VER', 'HAM'])plt.show()# Or save straight to a file# tif1.plot_speed_traces(2023, 'Spanish Grand Prix', 'Q', save_path='speed_traces.png')