Description Usage Arguments Details Author(s) Examples
By default, this uses the plot
function to create the plot
according to the arguments given as ...
. The plot
function
can be replaced by another function which creates a graph.
1 2 |
... |
the arguments to the plot function |
plotfun |
the plot function (by default |
caption |
figure caption |
method |
the graphics device type ( |
height |
the height of the plot in R units (commonly inches) |
width |
the width of the plot in R units (commonly inches) |
pointsize |
the pointsize of the plot |
bookmark |
the bookmark text (if missing, a default will be created) |
wdapp |
the handle to the Word Application (usually not needed) |
paragraph |
whether a paragraph is given after inserting the plot. |
The plot is transfered as a windows metafile.
Christian Ritter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
wdGet()
## a basic call using the default metafile device
wdTitle("R2wd: plotting")
wdPlot(1:100,sin(1:100),type="l",bty="l")
## a call using a ggplot function which uses semi-transparency
## this requires the bitmap device (the metafile device is nicer but doesn't render semi-transparency)
require(ggplot2)
funny<-function(){
c <- ggplot(mtcars, aes(qsec, wt))
print(c + stat_smooth())
}
wdPlot(plotfun=funny,method="bitmap")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.