Question: How to make boxplot of two-way anova factors using ggplot2
0
gravatar for Manoj
4 months ago by
Manoj30
Canada
Manoj30 wrote:

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 • 302 views
ADD COMMENTlink modified 4 months ago by RamRS25k • written 4 months ago by Manoj30
1

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 REPLYlink written 4 months ago by German.M.Demidov1.5k

No, this is no an issue.

ADD REPLYlink written 4 months ago by Manoj30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1534 users visited in the last hour