[R] How to set the limit of abline (regression line of lm)

Jim Lemon jim at bitwrit.com.au
Mon Sep 20 13:13:21 CEST 2010


On 09/20/2010 07:31 PM, elaine kuo wrote:
> Dear List,
>
>
>
> I ran a regression model using lm and produced a regression line using
> abline.
>
>
> The line ranges from -20 to 20 in x axis,
>
> and the section I only want is from -20 to 0.
>
>
>
> Please kindly advise any function in abline () to set the range of x axes.
>
Hi Elaine,
As already noted, you may not really want to do this, but ablineclip in 
the plotrix package will do it for you.

Jim



More information about the R-help mailing list