Package 'ggauto'

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

Help Index


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. v1, v2).

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 14.

base_family

Base font family. Defaults to "sans".

Value

A ggplot2 plot object.

Examples

ggauto(mtcars$mpg)
mtcars |> ggauto(mpg, wt)