For a set of 8 genes I have performance and coverage data for three different methods, I would like to represent at the same time both measurements. I was thinking about plotting performance in y-axis and coverage as scale_colour_gradient, something like:
And the data:
GENES P1 P2 P3 coverage1 coverage2 coverage3
gene1 0.520 0.43 0.68 0.826 1.000 0.84
gene2 0.410 0.48 0.91 0.911 1.000 0.96
gene3 0.240 0.65 0.82 0.833 1.000 0.95
gene4 0.470 0.535 0.81 0.853 1.000 0.77
gene5 0.590 0.677 0.84 0.813 1.000 0.89
gene6 0.370 0.55 0.54 0.753 1.000 0.82
gene7 0.420 0.56 0.78 0.867 1.000 0.91
gene8 0.550 0.638 0.76 0.830 1.000 0.83
Could anybody give me some guidelines on how to do that? I've seen examples of a single scale gradient per plot, but couldn't find like this. Do you know other ideas to represent this two dimensions of information at the same time?
Thanks.
EDIT: @Jimbou I've tried something similar but it didn't do what I expected: I formatted the data using melt
, then I changed colnames to avoid confusion and plot it:
colnames(d1) <- c("GENES", "performer", "performances","coverager","coverages")
ggplot(d1,aes(GENES, fill=performer, alpha=coverager)) + geom_bar(aes(weight=performances), position ="dodge")
But this isn't the same