
Last chance! 50% off unlimited learning
Sale ends in
bitmap()
device, which generates an
EPS file and the uses Ghostscript to transform it to a PNG file.
Moreover, if identical looking bitmap and vector graphics (EPS) files
are wanted for the same figures, in practice, bitmap()
has
to be used.
By default, this method tests a list of potential graphical devices and
returns the first that successfully creates an image file.
By default, it tries to create a PNG image file via the built-in
png()
device.System$findGraphicsDevice(devices=list(png), maxCount=100, sleepInterval=0.1, findGhostscript=TRUE, ...)
bitmap()
generated image files.TRUE
, ghostscript, which is needed by
the bitmap()
device, is searched for on the current system.
If found, its location is recorded.capabilities
().
png
,
bitmap()
and dev2bitmap
.
*findGhostscript()
.
For more information see System
.fcn <- System$findGraphicsDevice();
if (identical(fcn, png)) {
cat("PNG device found: png()");
} else if (identical(fcn, bitmap)) {
cat("PNG device found: bitmap()");
} else {
cat("PNG device not found.");
}
Run the code above in your browser using DataLab