I have a plot of 27 columns. I want to color them in a scale of greens for example. But I want them to be blocked in groups of three. E.g. first three columsn light green, then next three columns a darker shade of green and so on and so on. Currently the colors are just repeating themselves.
current code
# plot average for each ellenberg category for each quadrat
i = 1
for (df in ellenCatTab){
plotName <- names(ellenCatTab)[i]
i = i + 1
col_means <- colMeans(df[,5:31], na.rm=TRUE)
col_meansdf <- stack(col_means)
p <- ggplot(col_meansdf, aes(x=ind, y=values, fill=ind)) +
ggtitle(plotName) +
geom_col() +
theme_classic() +
scale_fill_manual(values=rep(c("darkseagreen1", "darkolivegreen1", "darkseagreen4"), 9), drop=FALSE) +
theme(legend.position='none')
plot(p)
}
current output
I want for example all the XI column to be the same color. Then the X2 to be different.