On 03/25/2010 06:03 AM, kathy_BJ wrote:


Jim, I really appreciate your hlep. You almost solve my problem, I had tried
both of your suggestions, but both of them only solve part of problem, and
how can I combine their functions? your second sample can't give the axis
(like 0-20, 20-50 etc), btw, we don't have "plotrix" function on our
machine.

That's okay, I have rewritten the x axis tick labelling so that you don't have to use staxlab. That's why you didn't get the axis labels.

What I want looks like the second plot from
http://www.statmethods.net/graphs/boxplot.html,

Great! We finally have an example of what you want.

I want to compare the MB between the two dataset, so the first/third/fifth
box should from file1(MB) with same color (black), second/fourth/sixth box
from file2(MB) with same color(red). Of course, the first (black) box and
second(red) box share the same data range (eg 0-20), and so on for other
group of box.

The attached code does this for the values in the made-up data that have col5 equal to RED (in your original post you indicated that you wanted to separate these colors). You will probably want to change this somewhat, but it is what I understand by the example and your explanation above.

Jim

______________________________________________
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.

Reply via email to