[R] axis lines crossing at origin
andy_liaw at merck.com
Thu Nov 11 17:27:10 CET 2004
You probably want something like:
plot(x,sin(x), xaxt="n", yaxt="n")
... but note that axis() only draws the axes from the minimum tick to the
maximum tick. You may still want to add:
> From: Robin Hankin
> how do I make my axes cross at the origin?
> x <- seq(from=-pi,to=pi,len=30)
> makes the axes cross at about (-pi,-1).
> How do I get my x and y axes to cross in the centre of the graph,
> with the sine curve passing through
> the intersection?
> I couldn't find anything in ?par or ?axis; searching R-FAQ for "axis"
> didn't help.
> Robin Hankin
> Uncertainty Analyst
> Southampton Oceanography Centre
> SO14 3ZH
> tel +44(0)23-8059-7743
> initialDOTsurname at soc.soton.ac.uk (edit in obvious way; spam
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help