[R] possible to plot number line in R?

John Kane jrkrideau at yahoo.ca
Thu Jul 1 14:13:41 CEST 2010


Here is a simple 'brute force' way to do it (assuming I understand what you want)
==================================================================
text1 <- "Interval 1"
text2 <- "Inteval 2"
text3 <-  "Interval 3"
ycord <- 3.3

plot(1:21, rep(3,21), type="l", xlab="Number Line", ylab="",yaxt="n")
arrows(c(7.5,14.5),c(2.8,2.8), c(7.5,14.5),c(3.2,3.2), length=0)
text(4, ycord, labels=text1, cex=.75)
text(11, ycord, labels=text1, cex=.75)
text(18, ycord, labels=text1, cex=.75)
======================================================================

--- On Thu, 7/1/10, Kroepfl, Julia (julia.kroepfl at uni-graz.at) <julia.kroepfl at uni-graz.at> wrote:

> From: Kroepfl, Julia (julia.kroepfl at uni-graz.at) <julia.kroepfl at uni-graz.at>
> Subject: [R] possible to plot number line in R?
> To: "'r-help at r-project.org'" <r-help at r-project.org>
> Received: Thursday, July 1, 2010, 7:18 AM
> Hallo!
> 
> Is there a possibility to plot a number line in R?
> I would like to display 3 different Intervals on the same
> number line. Ideally, it would be possible to add a name to
> each number (e.g. Interval 1, lower cut-off...and so on). I
> have not found a command for this.
> 
> Thank you for your help.
> 
> Julia
> 
> 
>     [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.
> 





More information about the R-help mailing list