Sharpie / RTikZDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.
32 stars 36 forks source link

'bg' parameter is not respected during plot creation #31

Closed cameronbracken closed 13 years ago

cameronbracken commented 13 years ago

The following code demonstrates the bug:

tikz("try.tex", standAlone=TRUE)
 op<-par(bg=11,bty="n", cex=2, mar=c(3,4,1,2)+0.1)
 x <- runif(100)
 plot(x, las=1, yaxt="n",tcl=0, ann=F, type="l", lwd=2, col="blue")
 grid(col="white", lty="solid", nx=NA, ny=NULL, lwd=2)
 lines(x, col="blue", lwd=2)
 axis(1, tcl=0, labels=FALSE, col="black", lwd=1, at=as.Date(c("1970-01-01","2011-01-01")))
 axis(2, las=2, tick=FALSE)
 par(op)
dev.off()

There should be a green background but it is white. In addition, changing the tikz 'bg' parameter actually has no effect, it is never actually used in the code.

Sharpie commented 13 years ago

Looks like 2 things need to happen:

Sharpie commented 13 years ago

It's fixed!

cameronbracken commented 13 years ago

lol woot!