Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gf_plot

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

Formula Interface to the Grammar of Graphics

v0.10.1
MIT + file LICENSE
Authors
Daniel Kaplan [aut], Randall Pruim [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.