bio_facet | R Documentation |
Function to create gg-style facet objects
bio_facet( text, colour = "grey80", outline_colour = "white", outline_width = 5, font_colour = "black", angle = 90, align = "center", size = 5 )
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 |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.