orb: Start a plot

View source: R/spec.R

orbR Documentation

Start a plot

Description

orb() creates a plot specification: it records the data and the mapping from variables to visual channels. Layers, labels, scales and themes are added with +. Nothing is drawn until the plot is printed or saved, so a specification is cheap to build and modify.

Usage

orb(data, ...)

Arguments

data

A data frame.

...

Aesthetic mappings, given as channel = column.

Details

Mappings are given as bare column names, in the style of a formula-free grammar: orb(df, x = wt, y = mpg, colour = cyl). The recognised channels are x, y, colour (or color), fill, size, label, group and tooltip.

Value

An object of class orb_spec.

See Also

orb_points(), orb_line(), orb_bars(), orb_area(), orb_map(), orb_save(), orb_interactive()

Examples

p <- orb(mtcars, x = wt, y = mpg, colour = cyl) + orb_points()
p

orbis documentation built on Aug. 5, 2026, 9:08 a.m.