Description Usage Arguments Value Author(s) References See Also Examples
This is a high-level graphics device for R that renders the display using compiled Flash generated from commands that this device emits to describe the R plot(s).
1 2 3 4 5 |
file |
the name of a file or a connection object to which the MXML code and ActionScript code is written.
If this is |
dim |
a numeric vector of length 2 giving the width and height of the graphics device. |
col |
the "initial" color to use for drawing. |
fill |
the initial color to use for filling rectangles, circles, polygons, etc. |
ps |
the initial point size for fonts. |
top |
the offset (an integer) for the top of the plot relative to the Flash application. This can be used to leave space at the top of the application for other components. |
left |
the offset (an integer) for the left side of the plot relative to the Flash application. This can be used to leave space at the left side of the application for other components. |
template |
the template MXML file which will be modified. |
compile |
a logical value indicating whether to compile the resulting MXML file into a SWF file.
One might want to defer this step in order to post-process the document.
If |
wrapup |
a function that is called when the device is closed. This is responsible for serializing the contents of the plot(s) to a file. It can also do further post-processing of the plot contents, e.g. add interactivity and animation. We can use this parameter to specify a different function that creates, for example, an ActionScript file rather than an MXML file. |
... |
additional arguments that are passed on to |
If file
is not NULL
, NA
or character
, the result is an
XMLInternalDocument
object.
Otherwise, we return the name of the generated MXML file if compile
is FALSE
and the output from the compiler if compile
is TRUE
.
Duncan Temple Lang
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # don't bother compiling the code
# for these examples so we specify compile = FALSE
# Ordinarily, we wouldn't and the code would also be compiled.
mxmlDevice("bob.mxml", compile = FALSE)
plot(1:10)
dev.off()
# We can omit the mxml extension.
mxmlDevice("bob", compile = FALSE)
plot(1:10)
abline(h = c(2, 4, 6))
abline(v = c(3, 5, 7), col = "lightgrey")
dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.