[Tikzdevice-bugs] tikz and grid/lines/axis?
Matthieu Stigler
matthieu.stigler at gmail.com
Thu Apr 14 12:14:12 CEST 2011
Hi
I'm trying to use tikzDevice for a quite complex plot, which has a grid,
adds axis, background color, and so on... However, the pdf I get looses
much of the information... Did I do something wrong? Did I miss some
important parameters/options?
Thanks!
Matthieu Stigler
## The plot:
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)
### with tikz:
library(tikzDevice)
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()
More information about the Tikzdevice-bugs
mailing list