Skip to contents

This is an utility function to output a decorated grob (gTree) object

Usage

as_pdf(grobs, outpath, pagesize = "letter.landscape")

Arguments

grobs

a grid grob (gTree) object, optionally NULL if only a grob with the decoration should be shown.

outpath

specify full path to output pdf to BCE or BEE

pagesize

name of pagesize (print size) and orientation, accepted values include "a4.landscape", "a4.portrait", "letter.portrait" and "letter.landscape" (default)

Value

a pdf file

See also

Author

Chendi Liao (liaoc10) chendi.liao@roche.com

Examples

if (FALSE) {
library(ggplot2)
g <- with(iris, {
  list(
    ggplotGrob(qplot(Sepal.Length, Sepal.Width, col = Species)),
    ggplotGrob(qplot(Sepal.Length, Petal.Length, col = Species)),
    ggplotGrob(qplot(Sepal.Length, Petal.Width, col = Species))
  )
})

# output to pdf
g %>% as_pdf("~/example_aspdf1.pdf")
}