Using the awesome ggplot
package, I want a barplot where the fill
aesthetic is mapped to a continous variable, actually qvalues and on top of it a text
I am answering my own question, as there is a way to fill a specific color to the pattern thank to this link.
On the first bar, for category "A", it could look like this:
replacing the pat1
pattern by the following code:
pat1 <- pattern(gTree(children=gList(
rectGrob(gp=gpar(col=NA, fill=cols[4])),
linesGrob(gp=gpar(col="black", lwd = 5)))),
width = unit(5, "mm"), height = unit(5, "mm"),
dev.width = 1, dev.height = 1)
For geom_bar
with few colours, it would work but for my issue where the fill
colour is mapped to a heatmap scale, it is going to be tedious.