Learn R Programming

DescTools (version 0.99.30)

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,
        compression = "lzw", 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?

compression

the type of compression to be used (tif only).

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"))
)
# }

Run the code above in your browser using DataLab