[R] axis lines crossing at origin
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Nov 11 19:17:44 CET 2004
"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
More information about the R-help
mailing list