[R] Help to Draw Plot

Patrick Connolly p_connolly at slingshot.co.nz
Wed May 14 22:02:24 CEST 2008


On Wed, 14-May-2008 at 09:12AM -0700, ermimi wrote:

|> 
|> Hello friends!!
|> 
|> I have two questions, and I would like that you could answer me!!!
|> 
|> I have created a plot as   
|> 
|> plot(range(10,-10),range(10,-10),col="blue",col.axis="blue",col.lab="blue",col.main="blue",col.sub="blue");
|> 
|> 
|> 1º) I want that the square of plot and the lines that indicates the value
|> -10,-5,0,5,10 have a blue colour too.

There would be tidier ways, but this will work:

points(range(10,-10),range(10,-10), col = "blue")
box(col = "blue")


|> 
|> 2º)It´s different to the question one. I want that the plot start and finish
|> in the two points that are drawn, is say... I want that the plot start in
|> (-10,-10) (corner left down) and finish in (10,10) (corner right up)... Now
|> the plot start in -11,-11 and finish in 11,11 more or less...

check out abline.

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