The entry point of the grammar: bind a default data frame and a default aesthetic mapping, then add layers, scales, and coordinate systems with +.

ggnext(data = NULL, mapping = NULL, width = 640, height = 480)

Arguments

data

A data frame used by all layers unless a layer overrides it.

mapping

Default aesthetic mapping created with aes().

width, height

Device size in pixels (default 640 x 480).

Value

A GgnextPlot object.

Examples

p <- ggnext(cars, aes(speed, dist)) + geom_point()
svg <- render(p)