[R] abline does not show on plot if slope differs from 0

jim holtman jholtman at gmail.com
Sun Aug 30 18:35:19 CEST 2009


Very simple, look at the x-axis you are plotting with.   If you want
the line, then use:

abline(a=1996, b=-1, col="dark grey", lty="dashed")


On Sun, Aug 30, 2009 at 12:25 PM, Gábor Pozsgai<pozsgaig at gmail.com> wrote:
> Hi,
>
> Does anybody have a hint why this does not work?
>
> plot(c(1991,2000), c(-1,10))abline(a=6, b=-1, col="dark grey", lty="dashed")
>
> It does not generate an error message, but the line does not turn up.
>
> If b=0 it works fine. If I change the axes of the plot to
> plot(c(1,10), c(-1,10)) it does work fine as well.
>
> Thanks,
> Gabor
>
> --
> Pozsgai Gábor
> www.coleoptera.hu
> www.photogabor.com
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list