Description Usage Arguments Details Author(s) References See Also Examples
Open an R graphics device based on the Cairo vector graphics library
1 2 3 4 5 6 | 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)
|
width |
The (initial) width in inches |
height |
The (initial) height in inches |
pointsize |
The pointsize of the font |
surface |
One of |
filename |
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. |
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).
Michael Lawrence
asCairoDevice
for embedding the device in an RGtk2 interface.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.