Plot

class foxglove.layouts.PlotPanel

Plot numerical values over time or other values.

For more information, see [the documentation](https://docs.foxglove.dev/docs/visualization/panels/plot).

config: PlotConfig
title: str | None = None

The title of the panel.

class foxglove.layouts.PlotConfig

Configuration for the Plot panel.

axis_scales_mode: Optional[Literal['independent', 'lockedScales']] = None

For Message path plots: - Independent (the default) lets you configure min and max values for the scales independently. - 1:1 is useful for when axes have the same units, and will keep the scales locked together. It hides the min/max axis settings and always zooms both axes simultaneously.

following_view_width: float | None = None

For Sliding time window: range of time in seconds

is_synced: bool | None = None

For Timestamp plots: Sync timeline to other Plot and State Transitions panels.

legend_display: Optional[Literal['floating', 'top', 'left']] = None

Position of the legend in relation to the chart

max_x_value: float | None = None

For Fixed time window: max value in seconds

max_y_value: str | float | None = None

Fixed maximum value for y-axis

min_x_value: float | None = None

For Fixed time window: min value in seconds

min_y_value: str | float | None = None

Fixed minimum value for y-axis

paths: list[PlotSeries] | None = None

The list of series to display in the panel.

playback_bar_position: Optional[Literal['center', 'right']] = None

For Sliding time window: either at the center or the right edge

show_legend: bool | None = None

Display the legend

show_plot_values_in_legend: bool | None = None

Show the corresponding y value next to each series in the legend (either at the current playback time or at a point on user hover)

show_x_axis_labels: bool | None = None

Whether or not to display numeric values for x-axis tick marks

show_y_axis_labels: bool | None = None

Whether or not to display numeric values for y-axis tick marks

sidebar_dimension: float | None = None

Size of the legend in pixels, when the legend position is Left or Top

time_range: Optional[Literal['all', 'latest']] = None

For Message path plots: - All shows data from the full time range - Latest shows data from the most recent message.

time_window_mode: Optional[Literal['automatic', 'sliding', 'fixed']] = None

For Timestamp plots: - Automatic Last 30 seconds for live data, or the full time range for recorded data - Sliding Specify a sliding time window that follows the current playback time - Fixed Set fixed min and max values for the time axis

x_axis_label: str | None = None

Label displayed for the x-axis

x_axis_path: PlotXAxisPath | None = None
x_axis_val: Optional[Literal['timestamp', 'index', 'custom', 'currentCustom']] = None

Type and source of data for values plotted on the x-axis: - Timestamp: x-values for time series data - Message path: numeric message fields for XY plots - Array index: integer indices of an array in the latest message

y_axis_label: str | None = None

Label displayed for the y-axis

class foxglove.layouts.PlotSeries

A series in a Plot panel.

color: str | None = None

Color used to plot the series

enabled: bool | None = None

Whether the series is enabled. If disabled, the series will not be displayed in the panel.

id: str | None = None

A unique identifier for the series.

label: str | None = None

Label displayed for the series in the legend

line_size: float | None = None

Width of line connecting data points

show_line: bool | None = None

Show line connecting data points. (Not applicable to reference lines.)

timestamp_method: Optional[Literal['receiveTime', 'publishTime', 'headerStamp', 'customField']] = None

For Timestamp plots, set which source of time information is used for message ordering: - receiveTime is the standard timestamp used for playback message ordering across the app. For live connections, this is when the message was received; for recorded files, this is when the message was originally recorded - customField is a message path which can point to any field within the message data containing sec and nsec integers - headerStamp is a header.stamp ROS 1 or ROS 2 field containing sec and nsec integers (and special case of ‘custom field’, above). This typically represents when sensor data was captured - publishTime is an optional MCAP-specific field representing when the event occurred

timestamp_path: str | None = None

Message path containing a timestamp field on the same topic as the y-value path

value: str | None = None

Message path containing y-axis values for the series

x_value_path: str | None = None

For Message path plots: message path containing x-axis values for the series. Overrides default x-axis values if set.

class foxglove.layouts.PlotXAxisPath

For path-based values: the message path containing default x-axis values for the series. You can also set these individually for each series.

enabled: bool | None = None

Whether the series is enabled. If disabled, the series will not be displayed in the panel.

value: str | None = None

Message path containing y-axis values for the series