How to make boxplot of two-way anova factors using ggplot2
0
0
Entering edit mode
4.6 years ago
Kumar ▴ 170

I need to make boxplot of two way ANOVA using ggplot. I tried using boxplot, however the visualization of plot it not appropriate especially x-axis is not according bars and so distance between bars. I am wondering if I can use ggplot, please have a look into below data and current plot. I need to arrange all factors (whc) on x-axis according different fields in separate color.

CODE:

    boxplot(numbers ~ whc * field, data = fac,
    cex.main=1.2, xlab="sites", ylab="mean", outline=FALSE, font.lab=3,
    ylim = c(0, 2000))

File 1: Example

field   whc numbers  
CL  W1.100  43236  
CL  W1.100.R    15961  
CL  W1.50   14284  
CL  W1.50.R 1465  
SiC W4.100  344  
SiC W4.100.R    432  
SiC W4.50   56  
SiC W4.50.R 456  
L   W5.100  4278  
L   W5.100.R    3743  
L   W5.50   1844  
L   W5.50.R 1471

Rplot222

R • 2.6k views
ADD COMMENT
1
Entering edit mode

log10 transform of y-axis is something that I can recommend out of the box =) and may be clean your dataset from the empty whc * field values.

ADD REPLY
0
Entering edit mode

No, this is no an issue.

ADD REPLY

Login before adding your answer.

Traffic: 1470 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6