Hi, I'm trying to graph some data in a boxplot-like style, but I want to set the box and whisker limits myself (rather than having R calculate them for me). I'd like the boxes to be shaded and the whiskers to be dotted lines. My data are set up is something like this: min.whisker max.whisker min.box max.box species 0 200 20 37 A 0 150 0 10 B 10 55 12 20 B etc... I have a categorical variable (species) which I'd like to use to group the boxes along the x-axis of the graph. I tried to do this by plotting a blank graph and adding the boxes and lines individually using the lines() function, but it was labour intensive, inelegant, and I couldn't get the bars in each group (species) not to overlap with one another. Does anyone know how to accomplish a graph like this in R with more succinct coding and/or a custom graphing package? Thanks! Regards, Brianna [[alternative HTML version deleted]]
On Jun 28, 2012 at 9:08pm Brianna Wright wrote:> I'm trying to graph some data in a boxplot-like style, but I want to set > the box and whisker limits myself...See ?bxp and ?boxplot for the format of the data you need to pass to bxp. (You just have to add the median to what you have provided in your example.) Regards, Mark. ----- Mark Difford (Ph.D.) Research Associate Botany Department Nelson Mandela Metropolitan University Port Elizabeth, South Africa -- View this message in context: http://r.789695.n4.nabble.com/custom-graphing-of-box-and-whisker-plots-tp4634826p4634845.html Sent from the R help mailing list archive at Nabble.com.
Maybe Matching Threads
- Removing lower whisker in boxplot to see the effects of the high values
- about the whisker in boxplot
- box-and-whisker plots based on summary not data
- boxplot knowing Q1, Q3, median, upper and lower whisker value
- changing parameters of the box and whisker plot