plot_config
¶
Pydantic models for the Dojo trial-viewer PlotConfig.
These are the single source of truth for both server-side validation (profile save/load) and the generated TypeScript types in lib/plot-config.generated.ts.
To regenerate TypeScript types after changing this file:
| Text Only | |
|---|---|
1 | |
PLOT_COLORS
module-attribute
¶
PLOT_COLORS: tuple[str, ...] = (
"#00b8db",
"#00bc7d",
"#2b7fff",
"#8e51ff",
"#fe9a00",
"#ff2056",
)
The colors a signal added to the plot takes, in this order, each as a 6-digit hex string. The trial viewer's color picker and its next-color rule read this list, through the generated TypeScript constant of the same name (run python scripts/gen_ts_models.py after changing it), and SensAI picks colors from it and is shown it in its instructions.
DashStyle
¶
MarkerSymbol
¶
Bases: StrEnum
Shape used to mark individual data points.
TRIANGLE_UP
class-attribute
instance-attribute
¶
Triangle-up marker.
TRIANGLE_DOWN
class-attribute
instance-attribute
¶
Triangle-down marker.
TRIANGLE_LEFT
class-attribute
instance-attribute
¶
Triangle-left marker.
TRIANGLE_RIGHT
class-attribute
instance-attribute
¶
Triangle-right marker.
TRIANGLE_NE
class-attribute
instance-attribute
¶
Triangle-ne marker.
TRIANGLE_SE
class-attribute
instance-attribute
¶
Triangle-se marker.
TRIANGLE_SW
class-attribute
instance-attribute
¶
Triangle-sw marker.
TRIANGLE_NW
class-attribute
instance-attribute
¶
Triangle-nw marker.
DIAMOND_CROSS
class-attribute
instance-attribute
¶
Diamond-cross marker.
ARROW_RIGHT
class-attribute
instance-attribute
¶
Arrow-right marker.
LineMode
¶
InterpMode
¶
HoverMode
¶
Bases: StrEnum
Tooltip behavior when hovering over the plot.
X_UNIFIED
class-attribute
instance-attribute
¶
Single tooltip showing all series at the hovered x value.
Y_UNIFIED
class-attribute
instance-attribute
¶
Single tooltip showing all series at the hovered y value.
CLOSEST
class-attribute
instance-attribute
¶
Tooltip for the nearest individual data point.
ScaleType
¶
ShapeType
¶
PlotType
¶
DisplayUnitSystem
¶
Bases: StrEnum
Named unit system for display-time conversion of telemetry values. When set, data is converted from its logged units to the chosen system before being returned to the frontend.
FFF
class-attribute
instance-attribute
¶
Furlong / firkin / fortnight. Not shown in the UI dropdown — set via the JSON editor.
PlotConfig
¶
VersusState
¶
Bases: BaseModel
What versus mode is set to: which other trials are drawn behind the open one. A saved profile carries it, and so does SensAI's view of the trial viewer.
-
Reference
mujoco_mojoutilslayersdojo
-
Reference
mujoco_mojoutilslayersdojoplot_configPlotProfile
PlotProfile
¶
Bases: VersusState
A saved profile: the full set of open plot tabs, and the versus mode it was saved with.
Replaces the old profile format (a single bare PlotConfig per saved
file) - see routers/mosaic.py's get_profile/save_profile for how a
legacy single-config file is transparently read as a one-tab profile.