Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AesMap ¶
AesMap maps aesthetic channel names to column names.
func ToAesMap ¶
ToAesMap converts a slice of aes.Mapping into an AesMap.
type CompiledLayer ¶
type CompiledLayer struct {
Geom geom.Layer
Mapping AesMap // fully merged mapping (global + layer)
Data dataset.Dataset // post-stat dataset (may differ from panel dataset)
}
CompiledLayer is a fully resolved layer ready for drawing.
type PanelPlan ¶
type PanelPlan struct {
Label string
Dataset dataset.Dataset
Layers []CompiledLayer
}
PanelPlan describes a single panel (facet sub-plot) in the render plan.
type PlotSpec ¶
type PlotSpec struct {
// Dataset is the primary data source.
Dataset dataset.Dataset
// GlobalMapping maps aesthetic channels to column names at the plot level.
// Per-layer mappings override these.
GlobalMapping AesMap
// Layers describes each visual layer (geom + stat + position + local aes).
Layers []LayerSpec
// ScaleOverrides holds user-specified scale configurations, keyed by
// aesthetic channel ("x", "y", "color", etc.).
ScaleOverrides map[string]ScaleOverride
// ColorScales holds user-specified color/fill scales, keyed by
// aesthetic channel ("color" or "fill"). nil entries fall back to
// the auto-detected default ([colormap.Viridis] for continuous data,
// [colormap.Tab10] for discrete data).
ColorScales map[string]*colormap.Scale
// Coord defines the coordinate system (default: Cartesian).
Coord coord.Coord
// Facet defines the faceting strategy (default: None).
Facet facet.Facet
// Theme holds the theme name or configuration.
ThemeName theme.Name
// Labels holds plot title, subtitle, axis labels, caption.
Labels Labels
// XLim and YLim hold optional user-specified axis limits.
// nil means auto-detect from data.
XLim [2]*float64
YLim [2]*float64
// LegendPosition controls where the legend is drawn.
LegendPosition string
}
PlotSpec is the fully declarative specification of a plot, produced by the user-facing builder API and consumed by the compilation pipeline.
type RenderPlan ¶
type RenderPlan struct {
// Panels contains the list of facet panels to render, each with its
// own dataset and compiled layers.
Panels []PanelPlan
// TrainedScales maps aesthetic channels to their trained scale state.
TrainedScales map[string]TrainedScale
// Labels holds resolved plot labels.
Labels Labels
// ThemeName is the resolved theme.
ThemeName string
}
RenderPlan is the output of the compilation pipeline — a fully resolved, validated plot specification ready for rendering.
Click to show internal directories.
Click to hide internal directories.