Skip to content
Back to formatted view

Raw Message

Message-ID: <x21xf0i71z.fsf@biostat.ku.dk>
Date: 2004-11-11T18:17:44Z
From: Peter Dalgaard
Subject: axis lines crossing at origin
In-Reply-To: <3A822319EB35174CA3714066D590DCD50994E2D4@usrymx25.merck.com>

"Liaw, Andy" <andy_liaw at merck.com> writes:

> You probably want something like:
> 
> plot(x,sin(x), xaxt="n", yaxt="n")
> axis(1, pos=0)
> axis(2, pos=0)
> 
> ... but note that axis() only draws the axes from the minimum tick to the
> maximum tick.  You may still want to add:
> 
> abline(v=0, h=0)

Also, you generally don't want to have a tick mark at the origin since
the other axis would go straight through the label, so you should
learn about the at= argument to axis() too.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907