plot
Stable type · Document types
Tier: stable · Kind: type · Topic: Document types
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | not exported | not exported | Plot | Plot |
Julia
Julia does not export this type.
TypeScript
TypeScript does not export this type.
Python
Python does not export this type.
Rust
pub struct Plot {
pub id: String,
pub plot_type: String,
pub description: Option<String>,
pub x: PlotAxis,
pub y: PlotY,
pub value: Option<PlotValue>,
pub series: Option<Vec<PlotSeries>>,
pub at_time: Option<f64>,
pub pinned_coords: Option<HashMap<String, f64>>,
pub contours: Option<Vec<f64>>,
}
A plot specification of a ModelAnalysis
(schema Plot). Structural
information only — axes, series selection, value reductions; styling is
the viewer’s concern.
Go
type Plot struct {
ID string `json:"id"`
Type string `json:"type"` // "line" | "scatter" | "heatmap"
Description *string `json:"description,omitempty"`
X PlotAxis `json:"x"`
Y PlotAxis `json:"y"`
Value *PlotValue `json:"value,omitempty"`
Series []PlotSeries `json:"series,omitempty"`
}
func (p *Plot) UnmarshalJSON(data []byte) error
Plot is a plot specification associated with an Analysis.
Methods
func (p *Plot) UnmarshalJSON(data []byte) error
UnmarshalJSON handles plots.y as either a single PlotAxis or an array of PlotAxis objects (v0.5.0 inline multi-series shorthand). When y is an array the first entry becomes the canonical Y axis and all entries are projected onto Series (using label-or-variable as the series name). An explicit series field, if present, takes precedence over the projection.