How to change colors in boxplot in R?
How to change colors in boxplot in R?
I want to change the colors of the cage parameters for example make cage1 in color, cage2 in different color etc.
plot_richness(physeq.alpha,x ='cage' ,col = 'cage', measures=c("Chao1","Shannon",'simpson','invsimpson','ACE')) + geom_boxplot(fill = c('red','blue','orange','purple','yellow'),color = 'darkgreen') +
scale_fill_manual(values=palette)
• 1,658 views
•
link
1 answer
The cage parameter was plotted with geom_point. I think you need to change the colors inside
geom_point.
Something like
geom_point(aes(x=cage,y=alpha_diversity, color=cage) +
scale_color_manual(values=c("color1,color2,colour3))
If you post a reproducible example, I can post more info. If this does not help I can try create one and post it later
• 0 views
•
link
Log in to answer this question.