openGraphCairo {visStatistics} | R Documentation |
Cairo wrapper function
Description
Cairo wrapper function returning NULL if not type
is specified
Usage
openGraphCairo(
width = 640,
height = 480,
fileName = NULL,
type = NULL,
fileDirectory = getwd(),
pointsize = 12,
bg = "transparent",
canvas = "white",
units = "px",
dpi = 150
)
Arguments
width |
see |
height |
see |
fileName |
name of file to be created. Does not include both file extension ". |
type |
Supported output types are "png", "jpeg", "pdf", "svg", "ps" and "tiff". See |
fileDirectory |
path of directory, where plot is stored. Default current working directory. |
pointsize |
see |
bg |
see |
canvas |
see |
units |
see |
dpi |
DPI used for the conversion of units to pixels. Default value 150. |
Details
openGraphCairo()
Cairo()
wrapper function. Differences to Cairo:
a) prematurely ends the function call to Cairo()
returning NULL, if no output type
of types "png", "jpeg", "pdf", "svg", "ps" or "tiff"
is provided.
b)
The file
argument of the underlying Cairo function is generated by file.path(fileDirectory,paste(fileName,".", type, sep = ""))
.
Value
NULL, if no type
is specified. Otherwise see Cairo()
Examples
## adapted from example in \code{Cairo()}
openGraphCairo(fileName="normal_dist",type="pdf", fileDirectory=tempdir())
plot(rnorm(4000),rnorm(4000),col="#ff000018",pch=19,cex=2)
dev.off() # creates a file "normal_dist.pdf" in the directory specified in fileDirectory
file.remove(file.path(tempdir(),"normal_dist.pdf"))