Hi FishLover, I believe this will answer your question:
# getting some dummy data seed(10) y <- rnorm(100) x <- sample(c(1,2,5.5), 100 , T) boxplot(y~x) # won't work boxplot(y~x, at = c(1,2,5.5), xlim = c(0,6)) # will work Cheers, Tal ----------------Contact Details:------------------------------------------------------- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Sun, Aug 22, 2010 at 6:42 AM, FishLover <goldenpuppy_p...@hotmail.com>wrote: > > Hello > > I'm trying to make boxplots > > However I'm having issues because my x axis is distance downstream on a > river. The boxplots function in r assumes the x axis are categorical > variables but I would like my boxplots to show true distance downstream > just > as it would if I used the plots function. However I want to show the box > and > whisker diagrams. My distances are not in evenly spaced intervals. > > Is there a way to do this with boxplots or perhaps another function? > > > Seems very simple but I've been trying for days! > Thanks so much in advance > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Help-making-box-plots-in-R-when-the-x-axis-is-a-quantitative-variable-tp2333967p2333967.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.