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")
Run the code above in your browser using DataLab