Для набора тестовых данных следующим образом:
df <- data.frame(x = rep(c(1, 2), 3),
type = rep(c("甲级", "乙级"), 3),
country = rep(c("日本", "德国", "韩国"), each = 2),
count = c(19419, 1132, 8138, 947, 8349, 436))
Я нарисовал график полукругов с кодом ниже под Ma c OS system:
ggplot(df, aes(x=x, y=sqrt(count), fill=type)) + geom_col(width =1) +
scale_x_continuous(expand = c(0, 0), limits = c(0.5, 2.5)) +
scale_y_continuous(expand = c(0, 0)) +
coord_polar(theta = "x", direction = -1) +
facet_wrap(~country) +
theme_grey(base_family = "STKaiti" )
Out:
![enter image description here](https://i.stack.imgur.com/UkH9c.png)
Но после добавления theme_void()
, чтобы сделать график более чистым, китайский иероглиф отображался некорректно.
ggplot(df, aes(x=x, y=sqrt(count), fill=type)) + geom_col(width =1) +
scale_x_continuous(expand = c(0, 0), limits = c(0.5, 2.5)) +
scale_y_continuous(expand = c(0, 0)) +
coord_polar(theta = "x", direction = -1) +
facet_wrap(~country) +
theme_grey(base_family = "STKaiti" )+
theme_void()
Out:
![enter image description here](https://i.stack.imgur.com/2Zz7R.png)
Кто-нибудь знает, почему это происходит и как решить эту проблему? Спасибо.