[R] boxplot with 2 treatments and 2 variables (with 2 corresponding y-axes)

From: Ellis, David <de223_at_exeter.ac.uk>
Date: Fri, 15 Apr 2011 15:20:23 +0100


Hi,

I am a complete newcomer to R and although I can plot standard box-plots I am struggling with this...

I have two treatments - A & B, and 2 variables 1 & 2. I want to compare boxplots of variable 1 with variable 2 for each treatment. I would also like them to all be on the same graphic.

I would like treatment to be on the x axis (A and B) and above A and B have their corresponding boxplots for both variables.I would also like 2 seperate y-axes, one for each variable - Variable 1 has a continuous y axis, and variable 2 is a percentage (of variable 1 in-fact, not that this should make a difference).

It would also be helpful if the boxplots were a different colour for each variable and that this corresponded somehow to the relevant axis. Or if someone can think of another way to show which treatment each boxplot is that would be gratefully recieved

Hope this makes sense and isn't too much of a pain to answer!

Thanks in advance
Dave

        [[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. Received on Fri 15 Apr 2011 - 15:53:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 06:40:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive