| Title: | Automatically Create and Style 'ggplot2' Charts |
| Version: | 0.0.1 |
| Description: | Automatically choose an appropriate chart type based on the types and values in the data. Apply more accessible default styling and colours to 'ggplot2' charts. |
| License: | MIT + file LICENSE |
| Depends: | R (≥ 4.1) |
| Imports: | dplyr, ggdist, ggforce, gghighlight, ggplot2, ggrepel, ggtext, glue, khroma, lemon, lubridate, rlang, scales, stringr |
| Suggests: | knitr, rmarkdown |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| Config/Needs/website: | nrennie/nrenniepkgdown |
| URL: | https://nrennie.rbind.io/ggauto/, http://nrennie.rbind.io/ggauto/ |
| BugReports: | https://github.com/nrennie/ggauto/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-03-21 14:23:23 UTC; nrenn |
| Author: | Nicola Rennie [aut, cre, cph] |
| Maintainer: | Nicola Rennie <nrennie.research@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-25 21:10:02 UTC |
Automatic ggplot plot
Description
Automatically create an appropriate ggplot2 chart type based on the classes of the provided variables.
Usage
ggauto(
data = NULL,
...,
xlab = NULL,
ylab = NULL,
title = NULL,
subtitle = NULL,
caption = NULL,
base_size = 14,
base_family = "sans"
)
Arguments
data |
A data frame, or a bare vector when not using the pipe. |
... |
Unquoted column names to plot (e.g. |
xlab |
Label for the x-axis. |
ylab |
Label for the y-axis. |
title |
Optional plot title. |
subtitle |
Optional plot subtitle. |
caption |
Optional plot caption. |
base_size |
Base font size. Defaults to |
base_family |
Base font family. Defaults to |
Value
A ggplot2 plot object.
Examples
ggauto(mtcars$mpg)
mtcars |> ggauto(mpg, wt)