I want to build 3 rows in one plot based on values ββfrom different columns of a data frame.
It should look something like this .
The y-values ββof graph 1 are the sum of the values ββof graphs 2 and 3. The color of section 1 and 2 can be completely filled (for example, blue and red), but the color of section 3 must be translucent.
I managed to make a graph for each column separately using the barplot() function, but I could not combine them into one graph.
barplot(covpatient[[1]]$cov, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "blue", col = "blue") barplot(covpatient[[1]]$plus, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "red", col = "red") barplot(covpatient[[1]]$min, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "gray", col = "gray")
Can anyone give me a hand?
source share