png.slide.full: PNG graph for PowerPoint generation (full size)

View source: R/png.slide.full.r

png.slide.fullR Documentation

PNG graph for PowerPoint generation (full size)

Description

A wrapper function for a call to png(), which opens a plot device (i.e. enables you to "print" a graphic to a file), and provides defaults for various parameters of that graphic suitable for a slide in a presentation. The plot area will over the full slide dimension and does not have to be resized or repositioned after pasting. Note that the plot must be generated and then dev.off() must be called to close the plot device (i.e. close the output graphic file)

Usage

png.slide.full(
  filename,
  w = 10,
  h = 7.5,
  units = "in",
  psize = 10,
  bg = "transparent",
  res = 600,
  ...
)

Arguments

filename

filename including path. To follow qP workflow standards should read the internal relative reference directory "../WorkAre/output/graphs"

w

width in units

h

height in units

units

units ('in', 'cm', or 'pt')

psize

pointsize in units

bg

background color

res

resolution of PNG graph. High values create top quality graph at the expense of large file size.

...

any additional parameters to be passed on the png()

Value

A graph written to file in .png format that does not have to be edited when pasted into MS PowerPoint(r).

See Also

png.slide.semi, png.report

Examples

png.slide.full(filename = file.path(tempdir(),"/myPNGslidefullexample.png"))
set.seed(1234567)
plot(x = 1:25,y = rnorm(25,50,5))
dev.off()

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.