qqSave: qqSave

View source: R/ggExpress.R

qqSaveR Documentation

qqSave

Description

Quick-Save ggplot objects

Usage

qqSave(
  ggobj,
  ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"),
  also.pdf = FALSE,
  save.obj = FALSE,
  bgcol = "white",
  page = c(F, "A4p", "A4l", "A5p", "A5l")[1],
  title = FALSE,
  fname = FALSE,
  suffix = NULL,
  w = 4,
  h = w,
  ...
)

Arguments

ggobj

Plot as ggplot object.

ext

File extension (.pdf / .png).

also.pdf

Save plot in both png and pdf formats. Default: FALSE.

save.obj

Save the ggplot object to a file. Default: FALSE.

bgcol

Plot background color. Default: "white".

page

Set page size to a predefined value, eg. "A4". Default: c(F, "A4p", "A4l", "A5p", "A5l")[1]

title

title field for pdf file (saved into file metadata)

fname

Manual filename

suffix

A suffix added to the filename. Default: NULL.

w

Width of the plot.

h

Height of the plot.

...

Pass any other parameter of the corresponding plotting function (most of them should work).

Examples

xplot <- ggplot2::qplot(12)
qqSave(ggobj = xplot)
qqSave(ggobj = xplot, ext = "pdf")

vertesy/ggExpress documentation built on Nov. 24, 2024, 10:44 p.m.