plot_position_chart
Plot lap-by-lap race positions for all drivers to visualize overtakes, pit-cycle shuffles, and recovery drives. Returns a PNG chart.
Instructions
Plot the lap-by-lap race position of every driver (a "race history" chart). Returns a PNG image.
Use when the user wants to see how the race unfolded, overtakes, pit-cycle shuffles or a driver's recovery drive.
Args:
year: Season year (2018+)
event: Race name or round number
session: "R" (default) or "S" (sprint)
highlight: Up to 8 driver codes drawn in colour (others are grey,
all are labelled). Default: the podium finishers.
save_path: If True, also write the PNG to the export directory
(default ./fastf1-exports/); a string is a directory or
a full .png path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"year": "<year>",
"event": "<event>"
},
"name": "plot_position_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| event | Yes | ||
| session | No | R | |
| highlight | No | ||
| save_path | No |