Skip to contents

Save ggplot with output path

Usage

ggout(plt, fpath, lab = "", omit = "", ...)

Arguments

plt

A ggplot object.

fpath

<chr> File path to save output and add to label.

lab

<chr> Custom label to use instead of fpath.

omit

<chr> Text to omit from the label.

...

Other arguments to pass to ggplot2::ggsave().

Value

The file path of the output.

Examples

if (FALSE) { # \dontrun{
fpath = "../output.png"
iris |> gghist() |> ggout(fpath)
} # }