# NOT RUN {
library(ggplot2)
data(mtcars)
# Create a custom theme
my_theme <- theme_gray() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major = element_blank()
)
p <- ggplot(mtcars, aes(hp)) +
geom_histogram() +
ggtitle("Mixing **bold** and *italics* is easy")
# Text is not rendered
p + my_theme
# Text is rendered properly
p + as_md_theme(my_theme)
# }
Run the code above in your browser using DataLab