Displaying 2 results from an estimated 2 matches for "addslid".
Did you mean:
addslide
2015 Jun 29
0
Support for transparency in metafile export & support for export to Powerpoint
...ncy, in a much better quality than what is provided by default in grDevices. This made me wonder if exporting a graph to Powerpoint could perhaps also be supported in grDevices?
In ReporteRs the code e.g. to export a ggplot would be
library( ReporteRs )
require( ggplot2 )
mydoc = pptx( )
mydoc = addSlide( mydoc, slide.layout = "Title and Content" )
mydoc = addTitle( mydoc, "Plot examples" )
myplot = qplot(Sepal.Length, Petal.Length
, data = iris, color = Species
, size = Petal.Width, alpha = I(0.7)
)
mydoc = addPlot( mydoc, function( ) print( myplo...
2015 Jul 04
0
Support for transparency in metafile export & support for export to Powerpoint
...rdPlot())
dev.copy()
return(p)}
p = captureplot()
plotsize = dev.size()
plotaspectr = plotsize[[1]]/plotsize[[2]]
if (!is.null(aspectr)) plotaspectr=aspectr
myplot=function(pl=p) print(pl)
if (type=="PPT") {doc = pptx();doc = addSlide(doc, slide.layout = "Blank");pagesize = dim(doc)$slide.dim} else {doc = docx();pagesize = dim(doc)$page-dim(doc)$margins[c(4,3)]}
pageaspectr = pagesize["width"]/pagesize["height"]
if (pageaspectr>plotaspectr) {xf=plotaspectr/pageaspectr;yf=1} else {xf=1;yf=pag...