Open an R graphics device based on the Cairo vector graphics library
Cairo(width = 7, height = 7, pointsize = 12,
surface = c("screen", "png", "pdf", "ps", "svg"), filename = NULL)
Cairo_pdf(filename, width = 7, height = 7, pointsize = 12)
Cairo_ps(filename, width = 7, height = 7, pointsize = 12)
Cairo_svg(filename, width = 7, height = 7, pointsize = 12)
Cairo_png(filename, width = 7, height = 7, pointsize = 12)
The (initial) width in inches
The (initial) height in inches
The pointsize of the font
One of screen
, pdf
, ps
, svg
,
or png
, indicating the cairo backend to use (the output format).
If missing, inferred from extension of the filename
argument.
The output filename (used only by file surfaces, not the screen).
If a file surface is specified but no filename is given, the filename defaults
to Rplots.SURFACE
where SURFACE
is the name of the current surface type.
Creates an R graphics device that draws to the specified Cairo surface. By default, this will draw to a GTK+ window on the screen, but it also outputs to pdf, ps, png, and svg files, depending on the capabilities of your cairo installation.
This functions the same as any other R graphics device. You may use the
conventional plot commands and expect essentially the same output,
except that everything is anti-aliased (similar to other vector-based
devices like Quartz). Alpha-blending is supported, as is enhanced interactivity
via getGraphicsEvent
. The device should work the
same across all supported platforms (Mac, Windows, and Linux).
asCairoDevice
for embedding the device in an RGtk2 interface.
# NOT RUN {
Cairo()
plot(1:10)
dev.off()
# }
Run the code above in your browser using DataLab