[R] x-axis order

Patrick Connolly p_connolly at ihug.co.nz
Mon Sep 17 21:52:29 CEST 2007


On Fri, 14-Sep-2007 at 02:18PM -0400, jim holtman wrote:

|> This should do what you want.
|> 
|> x<-c(26:52,1:25)
|> y<-rnorm(52)+1:52
|> 
|> plot(seq_along(x), y, xaxt='n')
|> axis(1, at=seq_along(x), labels=x)

And if you have to economize on keystrokes, 
seq(x) will achieve the same as seq_along(x)

HTH

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list