Re: [R] grid() : start values?

From: Duncan Murdoch <>
Date: Fri, 25 Apr 2008 08:19:03 -0400

On 4/25/2008 5:32 AM, Agustin Lobo wrote:
> Hi,
> is not there any way to tell grid() the starting value? With nx,ny
> I get the right number of grid cells, but not on the exact
> values I would like them. (I know I can do it with abline(), just
> asking for an easier way, i.e. grid(nx,nx,start.x,start.y))

See the help page:

If more fine tuning is required, use 'abline(h = ., v = .)'


Just use

abline(h=seq(starty, stopy, len=ny), v=seq(startx, stopx, len=nx))

Duncan Murdoch

> An alternative way (which would solve another problem) would be making
> the axes coincident with the rectangular plot region, that is, if ploting
> plot(0:10,0:10)
> get (0,0) just on the bottom down corner of the rectangle. I've tried
> with several par() and could not find the way.
> Thanks
> Agus mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 25 Apr 2008 - 12:23:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Apr 2008 - 12:30:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive