Skip to content

Plotting

The baglab.plot module provides ready-made plots for common visualizations.

All functions use matplotlib and return (fig, ax) tuples for further customization.

Time series

import baglab

fig, ax = baglab.plot_timeseries(t, data, ylabel="velocity [m/s]")

Trajectory

fig, ax = baglab.plot_xy_trajectory(x, y)
fig, ax = baglab.plot_xy_trajectory(x, y, color_by=speed)  # color by scalar

Step response

fig, ax = baglab.plot_step_response(t, command, response)

Error band

fig, ax = baglab.plot_error_band(t, error, label="tracking error [m]")