[R] coplot with png: disappearing grid lines

bogdan romocea br44114 at yahoo.com
Thu Dec 30 02:44:04 CET 2004

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,

a <- rnorm(50000)
b <- rnorm(50000)
c <- rnorm(50000)
coplot(a ~ b | c,pch=20,col="navy",

More information about the R-help mailing list