The sample data (pindex
) is like this:
gene index siC siJ Ctarget Jtarget
1 A1BG 0.00000000 0.00574890 -0.015349200 FALSE FALSE
2 A1CF 0.00000000 0.00000000 0.000000000 FALSE FALSE
3 A2LD1 2.51692976 -0.88139800 -0.112959000 TRUE TRUE
4 A2M 0.00000000 0.86064700 0.000000000 FALSE FALSE
5 A2ML1 0.00000000 1.07844000 0.000000000 FALSE FALSE
6 A4GALT 0.00000000 0.83358200 0.000000000 FALSE TRUE
7 AAAS 12.97712855 -0.64036900 0.000000000 TRUE TRUE
8 AACS 4.69408532 -0.02945270 0.000000000 TRUE TRUE
9 AADAC 0.00000000 0.00000000 0.000000000 FALSE FALSE
My code is like this:
ggplot(pindex, aes(Ctarget,log10(index+1))) + geom_boxplot(aes(colour=Jtarget))
This would draw boxplots according to CTarget
and Jtarget
column.
However, this plot is ugly and makes people confusing.
What I want to do is make four boxplots whose group is NEITHER Ctarget NOR Jtarget
, Ctarget
, Jtarget
and Ctarget AND Jtarget
(these four groups have overlaps).
Does anyone have ideas about this?