Or you can use lattice's xyplot(..., type = c("p","g"))
?panel.xyplot provides details -- Bert Gunter Genentech -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Kane Sent: Friday, January 25, 2008 9:49 AM To: John Lande; r-help@r-project.org Subject: Re: [R] plotting gridlines ?grid --- John Lande <[EMAIL PROTECTED]> wrote: > dear all, > > I have a very simple question but I could not figure > out. > > I need to make plots with grid in the background. > > something like I old retrive like this > > a=runif(100)*10 > b=runif(100)*10 > plot(a,b, pch=20, xlim=c(0, round(max(a))), > ylim=c(0, round(max(b)))) > vs=seq(0, max(a), 0.5) > for(i in 1:length(vs)){ > abline(v=vs[i], col="lightgrey") > } > hs=seq(0, max(b), 0.5) > for(i in 1:length(hs)){ > abline(h=hs[i], col="lightgrey") > } > points(a, b, pch=20) > > as you can see it is not very convenient > > -- > john > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > Looking for the perfect gift? Give the gift of Flickr! ______________________________________________ R-help@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. ______________________________________________ R-help@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.