using multiple fonts in ggplot2

I usually setting the font like below.

iris %>% 
ggplot(aes(Sepal.Length, Sepal.Width)) +
geom_point() +
labs(title = "안녕하세요. hello") +
theme_gray(base_family = "ArialMT")

Can I use 2 fonts by language?? For example, I want to set "ArialMT" to "안녕하세요" and "hello" to "TimesNewRoman".

You can specify different fonts for each plot element using the theme() function.
See this example (I can't use your specific fonts since I don't have it installed in my system)

library(ggplot2)
library(dplyr)

iris %>% 
    ggplot(aes(Sepal.Length, Sepal.Width)) +
    geom_point() +
    labs(title = "안녕하세요. hello") +
    theme_gray(base_family = "Latin Modern Roman") +
    theme(plot.title = element_text(family = "xkcd"))

Created on 2019-11-28 by the reprex package (v0.3.0.9000)

1 Like