Learn R Programming

DescTools (version 0.99.19)

PlotDev: Plot to Device

Description

Plot to a graphics device.

Usage

PlotDev(fn, type = c("tif", "pdf", "eps", "bmp", "png", "jpg"), width = NULL, height = NULL, units="cm", res = 300, open = TRUE, expr, ...)

Arguments

fn
Filename

type
one out of "tif", "pdf", "eps", "bmp", "png", "jpg"

width
the width of the graphic in cm.

height
the height of the graphic in cm.

units
The units in which height and width are given. Can be px (pixels), in (inches), cm (the default) or mm.

res
the resolution

open
logical. Should the graphic be opened after having being created?

expr
the plot expression

...
the dots are sent to the specified device function.

Details

A simple convenience wrapper for producing TIF-Files for publication.

See Also

tiff, pdf, postscript

Examples

Run this code
## Not run: 
# PlotDev(fn="bar", type="tiff", expr=
#   barplot(1:5, col=Pal("Helsana"))
# )## End(Not run)

Run the code above in your browser using DataLab