| Title: | Automatically Create and Style 'ggplot2' Charts |
|---|---|
| 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. |
| Authors: | Nicola Rennie [aut, cre, cph] |
| Maintainer: | Nicola Rennie <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1.9001 |
| Built: | 2026-06-02 08:11:33 UTC |
| Source: | https://github.com/nrennie/ggauto |
Automatically create an appropriate ggplot2 chart type based on the classes of the provided variables.
ggauto( data = NULL, ..., xlab = NULL, ylab = NULL, title = NULL, subtitle = NULL, caption = NULL, base_size = 14, base_family = "sans" )ggauto( data = NULL, ..., xlab = NULL, ylab = NULL, title = NULL, subtitle = NULL, caption = NULL, base_size = 14, base_family = "sans" )
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 |
A ggplot2 plot object.
ggauto(mtcars$mpg) mtcars |> ggauto(mpg, wt)ggauto(mtcars$mpg) mtcars |> ggauto(mpg, wt)