Documentation
¶
Overview ¶
Package aes provides aesthetic mapping constructors for the Grammar of Graphics. Aesthetics define how data variables map to visual properties like position, color, size, and shape.
Usage:
p := ggplot.New(ds,
aes.X("col_x"), // map column "col_x" to x-axis
aes.Y("col_y"), // map column "col_y" to y-axis
aes.Color("group"), // map column "group" to color
)
Index ¶
- type Mapping
- func Alpha(col string) Mapping
- func AriaLabel(col string) Mapping
- func Color(col string) Mapping
- func Fill(col string) Mapping
- func Group(col string) Mapping
- func Href(col string) Mapping
- func Label(col string) Mapping
- func Linetype(col string) Mapping
- func Shape(col string) Mapping
- func Size(col string) Mapping
- func Title(col string) Mapping
- func Weight(col string) Mapping
- func X(col string) Mapping
- func XEnd(col string) Mapping
- func XMax(col string) Mapping
- func XMin(col string) Mapping
- func Y(col string) Mapping
- func YEnd(col string) Mapping
- func YMax(col string) Mapping
- func YMin(col string) Mapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapping ¶
type Mapping struct {
Channel string // aesthetic name: "x", "y", "color", "fill", "size", "shape", "alpha", "group", "label", "linetype"
Column string // column name in the dataset
}
Mapping binds an aesthetic channel to a data source.
func AriaLabel ¶ added in v0.0.11
AriaLabel maps a column to the ARIA accessibility label aesthetic. In SVG output, primitives get an aria-label attribute for screen readers.
func Href ¶ added in v0.0.11
Href maps a column to the hyperlink aesthetic. In SVG output, primitives are wrapped in <a href="...">. PDF may emit link annotations. PNG output ignores this aesthetic.
func Title ¶ added in v0.0.11
Title maps a column to the SVG <title> tooltip aesthetic. In SVG output, each primitive gets a <title> child element for hover tooltips. PNG and PDF output ignore this aesthetic.