Skip to main content
Gear usage across a lap shows corner characteristics, acceleration zones, and the technical demands of a circuit. This tutorial creates a color-coded track map. Each segment is colored by the gear in use. Gear shifts visualization on track layout

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 matplotlib LineCollection 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
Different circuits have distinct gear usage profiles. Street circuits like Monaco use lower gears extensively, while high-speed tracks like Monza spend more time in top gears.

Parameters

The native chart accepts the shared filters plus a few chart-specific options. Change the gear color scale with cmap, or write the figure straight to a file with save_path:
The colorbar is scaled from the data, not the fixed 8-gear range in the example above. The chart works for any gearbox.

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
Last modified on September 3, 2026