
Loading the Session
Analyze the fastest qualifying lap from the 2021 Austrian Grand Prix.Getting Telemetry Data
Extract the fastest lap and its telemetry, which includes X/Y coordinates and gear data.Preparing the Data
Convert telemetry to numpy arrays and create line segments for plotting.Creating the Visualization
Use the matplotlibLineCollection to color each segment by gear.
Adding a Colorbar
Add a colorbar to show which color corresponds to each gear.Analyzing Gear Usage
When examining gear shift patterns, look for:- Low-speed corners: Gears 1-3 indicate tight corners requiring heavy braking
- Medium-speed corners: Gears 4-5 show flowing sections where momentum is maintained
- High-speed sections: Gears 6-8 reveal straights and fast corners
- Shift points: Transitions between colors show where drivers change gears
Parameters
The native chart has one chart-specific option:cmap sets the gear color scale. save_path writes the figure straight to a file:
Complete Example
The whole workflow above is wrapped in a single native function:Next Steps
- Combine gear data with throttle and brake data to analyze driving technique
- Compare gear usage between different drivers on the same circuit
- Analyze how gear usage changes between qualifying and race conditions
- Explore other track visualizations like speed or throttle maps