bio_facet: Function to create gg-style facet objects

View source: R/bio_facet.R

bio_facetR Documentation

Function to create gg-style facet objects

Description

Function to create gg-style facet objects

Usage

bio_facet(
  text,
  colour = "grey80",
  outline_colour = "white",
  outline_width = 5,
  font_colour = "black",
  angle = 90,
  align = "center",
  size = 5
)

Arguments

text

The facet title

colour

Facet background colour

outline_colour

Colour for facet outline (default="white")

outline_width

Size of face outline (default=5)

angle

Text angle/direction (0=horizontal, 90=vertical)

align

Text alignment

size

Font size

fontcolour

Font colour

Examples

blank = bio_facet("", "white") 
col1 = bio_facet("Sepal.Length", "grey80", angle=0) + theme(plot.margin=margin(0, 2, 0, 2))
col2 = bio_facet("Sepal.Width", "grey80", angle=0) + theme(plot.margin=margin(0, 2, 0, 2))
row = bio_facet("Species", "grey80") 
length=ggplot(iris, aes(x=Species, y=Sepal.Length)) + geom_boxplot()
width=ggplot(iris, aes(x=Species, y=Sepal.Width)) + geom_boxplot()
ggarrange(blank, col1, col2, row, length, width, ncol=3, heights=c(0.05, 1), widths=c(0.1, 1, 1))

KatrionaGoldmann/BioOutputs documentation built on May 21, 2022, 1:24 p.m.