aes

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: MIT Imports: 0 Imported by: 0

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

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 Alpha

func Alpha(col string) Mapping

Alpha maps a column to the opacity aesthetic.

func Color

func Color(col string) Mapping

Color maps a column to the color aesthetic.

func Fill

func Fill(col string) Mapping

Fill maps a column to the fill color aesthetic.

func Group

func Group(col string) Mapping

Group maps a column to the grouping aesthetic (for line connections, etc.).

func Label

func Label(col string) Mapping

Label maps a column to the text label aesthetic.

func Linetype added in v0.0.8

func Linetype(col string) Mapping

Linetype maps a column to the line dash pattern aesthetic.

func Shape

func Shape(col string) Mapping

Shape maps a column to the point shape aesthetic.

func Size

func Size(col string) Mapping

Size maps a column to the size aesthetic.

func Weight

func Weight(col string) Mapping

Weight maps a column to a statistical weight aesthetic.

func X

func X(col string) Mapping

X maps a column to the x-axis position aesthetic.

func XEnd added in v0.0.5

func XEnd(col string) Mapping

XEnd maps a column to the end x-position of a segment.

func XMax

func XMax(col string) Mapping

XMax maps a column to the right bound of a range aesthetic.

func XMin

func XMin(col string) Mapping

XMin maps a column to the left bound of a range aesthetic.

func Y

func Y(col string) Mapping

Y maps a column to the y-axis position aesthetic.

func YEnd added in v0.0.5

func YEnd(col string) Mapping

YEnd maps a column to the end y-position of a segment.

func YMax

func YMax(col string) Mapping

YMax maps a column to the upper bound of a range aesthetic.

func YMin

func YMin(col string) Mapping

YMin maps a column to the lower bound of a range aesthetic (e.g., error bars).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL