Created
February 5, 2020 18:21
-
-
Save moldach/d184be424098e69f2dde3599b6cba83c to your computer and use it in GitHub Desktop.
ggtext troubleshooting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remotes::install_github("wilkelab/ggtext") | |
library(tibble) | |
library(ggplot2) | |
library(dplyr) | |
data <- tribble( | |
~bactname, ~OTUname, ~name, ~value, | |
"Staphylococcaceae", "OTU1", "Staphylococcaceae (OTU1)", -0.5, | |
"Moraxella", "OTU2", "Moraxella (OTU2)", 0.5, | |
"Streptoccus", "OTU3", "Streptococcus (OTU3)", 2.0, | |
"Acinetobacter", "OTU4", "Acinetobacter (OTU4)", 3.0 | |
) | |
library(ggtext) | |
data %>% | |
ggplot(aes(name, value)) + | |
geom_col() + | |
coord_flip() + | |
ggtitle("species names are *in italics*") + | |
theme(plot.title = element_markdown()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sessionInfo()