
Loading the Session
Visualize the fastest lap from the 2023 Monaco Grand Prix qualifying session.Getting Track Position and Telemetry
The telemetry includes X, Y coordinates for the car’s position and speed data.Creating the Visualization
Use the matplotlibLineCollection to create a color-coded track map.
Adding Corner Markers
Enhance the visualization with corner numbers from the circuit info. Put this code before theplt.show() call of the previous block. The markers then appear on the same figure.
Parameters
The native chart always draws the fastest lap of the session, so it has no driver or lap filters. Thecmap parameter changes the color scale, and save_path writes the figure directly:
cmap='plasma' matches the chart above.
Complete Example
The whole workflow above is wrapped in a single native function:Interpreting the Visualization
- Yellow and orange: High-speed sections like straights
- Purple and dark blue: Low-speed corners and braking zones
- Gradients: Show acceleration and deceleration patterns
Next Steps
- Create throttle maps to see driver inputs
- Visualize brake zones to analyze braking points
- Compare acceleration patterns around the circuit