[R] abline

Petr Pikal petr.pikal at precheza.cz
Tue Mar 9 10:09:16 CET 2004


Hi

On 8 Mar 2004 at 9:54, Grace Conlon wrote:

> if I want to specify y-coordinates for the heights of horizontal lines
> to go across a plot.
> 
> x <- c(1,2,3,6,4,8,4,7)
> y <- c(3,2,7,4,5,4,5,6)
> h <- c(3,5,7)
> plot(x,y)
> abline(y=h)
try abline(h=h)

see ?abline

Cheers


> 
> However I got error message:
> Warning message: 
> parameter "y" couldn't be set in high-level plot() function 
> (I tried abline(h=y) , it;s not what I want also)
> 
> Do u know why?
> 
> 
> 
> ---------------------------------
> 
> 
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list