graphicsDevice {unknown} | R Documentation |
This is the general function and methods to create a graphics device whose primitive methods are implemented via R functions.
graphicsDevice(name, dim = c(1024, 768), col = "black", fill = "transparent", ps = 10, ..., funcs = list(...), ipr = rep(1/72.27, 2))
name |
either the name of the device or a
RDevDescMethods-class object.
If the latter is suplied, we compute the name by calling the
deviceName function and invoking the method
corresponding to this type.
The resulting name is used in the .Devices list.
This name is often a general description of the type of the device,
i.e. not a desciption of the particular instance, although it can be
as this would make it easier to identify the individual devices in
the .Devices list. |
dim |
a numeric/integer vector giving the width and height of the device. |
col |
the default/starting drawing color |
fill |
the default/starting color used to fill rectangles, circles, etc. |
ps |
the initial point size for the default font |
... |
zero or more name = value pairs which are used as
functions implementing the graphics device methods.
The names must (partially) match the slot names of the RDevDescMethods-class class. |
funcs |
this is an alternative way to specify functions that implement the graphics device methods. We use this when the functions are already in a list and it is akward to specify them via the ... mechanism. This can be |
ipr |
a numeric vector of length 2 giving the number if inches per raster/pixel for the horizontal and vertical dimensions. |
An object of class DevDescPtr-class
.
Duncan Temple Lang
“The R Internals Manual”, R Development Core Team.
devFuns = dummyDevice() dev = graphicsDevice("MyDummyDevice", funcs = devFuns) .Devices dev$right dev$right = 1000 dev$bottom = 800 # All important to get the plot region with adequate margins dev$ipr = rep(1/72.27, 2) dev$right dev$ipr as(dev, "DevDesc") plot(1:10) # warnings are coming from the lack of a return from functions that #