mat_col_facet: Colour facets of ggplot

View source: R/ggplot.R

mat_col_facetR Documentation

Colour facets of ggplot

Description

Colour facets of ggplot

Usage

mat_col_facet(pl, pal = c("#FFD400", "#267000"), side = c("top", "side"))

Arguments

pl

plot

pal

palette

side

top or side?

Examples

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"))

MatthieuStigler/matPkg documentation built on Nov. 13, 2023, 7:53 p.m.