R: Plot to Device

PlotDev {DescTools} | R Documentation

## 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.

### Author(s)

Andri Signorell <andri@signorell.net>

### See Also

`tiff`, `pdf`, `postscript`

### Examples

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

[Package DescTools version 0.99.24 Index]