[R] odfWeave graphics glitch

mxkuhn mxkuhn at gmail.com
Wed Feb 23 01:27:34 CET 2011


John,

What version of odfWeave and OO are you using?

Thanks,

Max

On Feb 22, 2011, at 3:17 PM, "Prof. John C Nash" <nashjc at uottawa.ca> wrote:

> Using R2.12.1 on Ubuntu 10.04.1 I've tried to run the following code chunk in odfWeave
> 
> <<fig1, echo=TRUE,fig=TRUE,width=7,height=4>>=
> x<-seq(1:100)/10
> y<-sin(cos(x/pi))
> imageDefs <- getImageDefs()
> imageDefs$dispWidth <- 4.5
> imageDefs$dispHeight<- 4.5
> setImageDefs(imageDefs)
> X11(type="cairo")
> plot(x,y)
> title(main="sin(cos(x/pi))")
> savePlot("sincosx.png")
> @
> 
> This is embedded in file example02in.odt, which has very little else.
> 
> In R I run
> 
> library(odfWeave)
> infile<-"example02in.odt"
> outfile<-"ex2.odt"
> odfWeave(infile,outfile)
> 
> I get the png file created, but the ex2.odt is "corrupted" according to OpenOffice.
> On automatic fixup, it does have a frame for a graph, but this is labelled "Read Error".
> 
> Note that the vignette for odfWeave has a blank graph too. I've emailed the package
> maintainer, but so far no response.
> 
> Wondering if it's just my inexperience with this (I manage Sweave OK, but a client is
> interested in non-TEX solution). Or perhaps some issue has developed recently that blocks
> graphics in odfWeave. Note that some of the stuff in the example (the cairo line for
> example) are part of several tries to find a solution.
> 
> JN
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list