[R] coplot with png: disappearing grid lines

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Dec 30 08:52:41 CET 2004


bogdan romocea wrote:

> Dear useRs,
> 
> When I use coplot() and output to png/jpeg/bmp, the grid lines from
> the scatter plots disappear. If I output to pdf() the grid lines are
> there, however I can't use it - I have many points, and the resulting
> PDF file is large and very slow to open and scroll through. (By the
> way, if I click File-Save As-png/jpeg/bmp from Rgui.exe, the grid
> lines are preserved - but I need to use code.)
> 
> With coplot(), is there a way to:
> 1. Keep the grid lines in the scatter plots when exporting output to
> png(), and perhaps change their color?
> 2. Specify the number of grid lines to be drawn on the x and y axes?
> 
> I'm running R 2.0.0 on Win XP.
> 
> Thank you,
> b.
> 
> a <- rnorm(50000)
> b <- rnorm(50000)
> c <- rnorm(50000)
> #pdf("test.pdf",height=9,width=12)
> png("test.png",height=900,width=1200)
> coplot(a ~ b | c,pch=20,col="navy",
> 	bar.bg=c(num=gray(0.8),fac=grey(0.95)))
> dev.off()


For me "grid lines" are there using R-2.0.1, Windows NT, with your example.

Uwe Ligges



> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list