mat_col_facet: Colour facets of ggplot

Description Usage Arguments Examples

View source: R/ggplot.R

Description

Colour facets of ggplot

Usage

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

Arguments

pl

plot

pal

palette

side

top or side?

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 Aug. 10, 2021, 11:01 a.m.