Here is some code to get you started:
plot.new() plot.window( c(0,10), c(-1, 1) ) axis(1, at=0:10, pos=0) lines( c(2,2,5,5), c( -0.25, -0.5, -0.5, -0.25 ) ) text( 3, -0.6, 'Interval 1' ) # the plotrix package has a function for text in a box lines( c(3,3,6,6), c( 0.1, 0.3, 0.3, 0.1) ) text( 4.5, 0.4, 'Interval 2' ) lines( c(4,4,7,7), c( -0.4, -0.6, -0.6, -0.4 ) ) text( 5.5, -0.7, 'Interval 3' ) pieces could be placed in functions to automate the parts that you want. hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Kroepfl, Julia (julia.kroe...@uni-graz.at) > Sent: Friday, July 02, 2010 2:40 AM > To: 'r-help@r-project.org' > Subject: [R] possible to plot number line in R? > > Thank you very much for your answers, but I think I did not explain > thoroughly enough what I needed. I attached a demo of the plot. I need > the number line between 2 and 3, both values being shown on the line, > interval values should be printed next to the dashes and lines should > connect the intervals. > > Is this possible to do in R? > > > > Best Regards, > > Julia > ______________________________________________ R-help@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.