library(ggplot2)
p <- ggplot(mtcars) +
geom_point(
aes(
x = mpg,
y = hp
)
) +
labs(
x = "Miles per gallon",
y = "Horsepower",
title = "Horsepower relative to miles per gallon"
)
# font not loaded so an error will be generated
try(p + theme_hdx())
try(load_hdx_fonts())
try(p + theme_hdx())
Run the code above in your browser using DataLab