Skip to main content
This tutorial shows how to create a qualifying results chart. The chart displays each driver’s performance relative to pole position, with team colors. Qualifying results showing gap to pole position for all drivers

Overview

The qualifying results chart is a horizontal bar chart that shows:
  • Each driver’s position in qualifying order (fastest at top)
  • Gap to pole position in seconds
  • Team colors for visual identification
  • Clear pole position reference

Loading the Data

First, load the qualifying session and get all drivers’ fastest laps. This code ranks the laps with idxmin, so it removes deleted laps first. In this session, TSU had a deleted lap that would otherwise move him from 15th to 11th. Laps.pick_fastest() and session.get_fastest_laps() skip deleted laps on their own.

Getting Fastest Laps per Driver

Extract each driver’s fastest lap from the session.

Calculating Gap to Pole

The chart shows time differences from pole position, not absolute lap times. Store the gap as float seconds, so that the bar axis shows seconds.
This shows the gap from each driver to pole position, in seconds.

Getting Team Colors

Use the tif1 color mapping to get official team colors.

Creating the Visualization

Build a horizontal bar chart with proper formatting.

Parameters

The native function exposes the shared filters. n_drivers keeps only the top-N finishers. include_deleted controls whether deleted laps count toward a driver’s best. The default is False, because a deleted lap does not count for the grid:

Complete Example

The whole workflow above is wrapped in a single native function:
The pole lap time and driver are shown in the title automatically.

Customization Options

To show only the top 10, use n_drivers=10 (shown in the Parameters section). To highlight a driver, style the returned ax after the call. The bars are drawn from timedelta values, so read the gaps from fastest_laps['LapTimeDelta'] above rather than from the bar widths:

Comparing Multiple Sessions

Create side-by-side comparisons of different qualifying sessions:

Exporting the Chart

Save the visualization for reports or presentations:

Key Insights from the Chart

Use this visualization to identify:
  • Pole position and front row starters
  • Gaps between drivers and teams
  • Team performance clusters
  • Drivers who significantly outperformed or underperformed
  • Q1/Q2 elimination cutoffs (positions 16-20, 11-15)

Summary

The qualifying results chart shows the competitive order and the performance gaps in qualifying. Team colors and gaps to pole make patterns and driver comparisons clear.

Qualifying Analysis

A detailed examination of qualifying data.

Driver Lap Times

Analyze lap time progression.

Data Visualization

More visualization techniques.

Plotting API

Plotting functions reference.
Last modified on October 28, 2026