getParameters.Device: Gets parameters specific to a certain type of device

Description Usage Arguments Value Author(s) See Also

Description

Gets parameters specific to a certain type of device. This method is used by *print() and *open().

Usage

1
Device$getParameters(filename=this$filename, path=getPrintPath(this), width=NULL, height=NULL, aspectRatio=NULL, pointsize=NULL, quality=NULL, bg=NULL, fg=NULL, debug=NULL, ...)

Arguments

filename

A filename where to save the resulting plot. The filename suffix decides what graphical device driver will used.

path

The output path where the figure is saved.

width, height

The width and height of the image. If both are NULL the graphical device driver's default settings are used. If one of them are missing, the other one are set to the default value according to the default settings and the missing argument is assumed to be of size "100%". If any of the two are given as a percentage string, e.g. "75%", its value is calculated to of that percentage of the other value, which must be absolute.

aspectRatio

If TRUE, the height will be defined by the aspect ratio of the current device. If numeric, height will be the width times the aspect ratio. Otherwise aspectRatio is ignored.

pointsize

The font pointsize to be used. If NULL the graphical device driver's default settings are used.

quality

The quality in [0,100]% if applicable. This argument is currently only used by the jpeg device driver. If NULL the graphical device driver's default settings are used.

bg, fg

Background and foreground colors used by the PicTeX driver. If NULL the graphical device driver's default settings are used.

debug

Used by the PicTeX driver. If NULL the graphical device driver's default settings are used.

...

Not used.

Value

Returns a named list structure with elements pathname, imgName, imgType, height, width, aspectRatio, quality, pointsize, bg, fg, and debug.

Value pathname is the pathname to the image file validate to writable. Value imgName is the basename of the pathname without the filename extension, which is returned (in lower case) by imgType.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

*print() and *open(). For more information see Device.


HenrikBengtsson/R.graphics documentation built on May 6, 2019, 11:53 p.m.