[R] How to control height of abline

Dimitris Rizopoulos Dimitris.Rizopoulos at med.kuleuven.be
Tue Jun 17 21:06:08 CEST 2008


check this:

x <- rnorm(200)
dd <- density(x)
plot(dd)
ind <- seq(100, 400, len = 6)
arrows(dd$x[ind], 0, dd$x[ind], dd$y[ind] - 0.015, length = 0.2)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
      http://www.student.kuleuven.be/~m0390867/dimitris.htm


Quoting mogra <funnymoody999 at yahoo.com>:

>
> I use plot to get the density curve and then I use
>
> abline(v=g$V2, col = 3 )  to get the vertical line for specific point on x
> axis.
>
> Goal : I want very small lines at the bottom on the x axis , if possible in
> the arrow forms instead of vertical lines on the whole graph.
>
> Thanks a lot.
> --
> View this message in context:   
> http://www.nabble.com/How-to-control-height-of-abline-tp17932528p17932528.html
> Sent from the R help mailing list archive at Nabble.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.
>
>



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list