我的图表可以工作,但是我无法改变字体家族。即使我能够改变其他方面,比如颜色、大小和对齐方式,字体始终保持默认。
这是我的代码:
ggplot(data = SeattleJuly17Data,
aes(x = Price, y = SatisfactionScore, col = RoomType)) +
geom_point() +
xlim(0,500) +
geom_smooth() +
ggtitle("Satisfaction Trends by Price and Room Type") +
theme(plot.title = element_text(family = "Calibri",
size=15,
color="Red",
hjust = 0.5)) +
xlab("Price per Night") +
ylab("Guest Satisfaction Score")
extrafont
或showtext
。 - camille