mat_col_facet | R Documentation |
Colour facets of ggplot
mat_col_facet(pl, pal = c("#FFD400", "#267000"), side = c("top", "side"))
pl |
plot |
pal |
palette |
side |
top or side? |
library(ggplot2)
# facet on side:
pl <- ggplot(aes(x=Sepal.Length, y=Sepal.Width), data = iris) +
geom_point()+
facet_grid(Species~.)
plot(mat_col_facet(pl, pal = c("red", "blue", "pink"), side = "side"))
## facet on top:
pl2 <- pl +
facet_grid(. ~Species)
plot(mat_col_facet(pl2, pal = c("red", "blue", "pink"), side = "top"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.