devNew | R Documentation |
Opens a new device.
devNew(type=getOption("device"), ..., scale=1, aspectRatio=1, par=NULL, label=NULL)
type |
A |
... |
Additional arguments passed to the device |
scale |
A |
aspectRatio |
A |
par |
An optional named |
label |
An optional |
Returns the device index of the opened device.
The default width and height of the generated image is specific to
the type of device used. There is not straightforward programmatic
way to infer these defaults; here we use devOptions
(), which
in most cases returns the correct defaults.
The aspect ratio of an image is the height relative to the width.
If argument height
is not given (or NULL
), it is
calculated as aspectRatio*width
as long as they are given.
Likewise, if argument width
is not given (or NULL
), it is
calculated as width/aspectRatio
as long as they are given.
If neither width
nor height
is given, then width
defaults to devOptions(type)$width
.
If both width
and height
are given, then
aspectRatio
is ignored.
Henrik Bengtsson
devDone
() and devOff
().
For simplified generation of image files, see devEval
().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.