gf_plot: Formula interface to ggplot()

View source: R/gf_plot.R

gf_plotR Documentation

Formula interface to ggplot()

Description

Create a new ggplot and (optionally) set default dataset aesthetics mapping.

Usage

gf_plot(...)

Arguments

...

arguments that can include data (a data frame or something that can be ggplot2::fortify()ed to become one) and aesthetics specified using the following formula notation: aesthetic = ~ expression. See examples.

Value

a gg object

Examples

gf_plot(mtcars, x = ~ wt, y = ~ mpg, color = ~ factor(cyl)) |>
  gf_density_2d() |>
  gf_point()


ggformula documentation built on Nov. 9, 2023, 5:08 p.m.