Skip to contents

Save a ggplot object to a file using ggpubr::ggexport.

Usage

savefig(plot, file, width = 8, height = 5, show = T, verbose = F, ...)

Arguments

plot

A ggplot object to save.

file

A character string indicating the file path.

width

A numeric value indicating the width of the plot (default: 8).

height

A numeric value indicating the height of the plot (default: 5).

show

Logical; if TRUE, display and return the plot after saving.

verbose

Logical; if TRUE, print saving message.

...

Additional arguments passed to ggpubr::ggexport.

Value

A ggplot object if show = TRUE, otherwise NULL.