Skip to content
Prev 58863 / 398502 Next

axis lines crossing at origin

Hi

how do I make my axes cross at the origin?

x <- seq(from=-pi,to=pi,len=30)
plot(x,sin(x))

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.