【发布时间】:2020-04-14 02:06:56
【问题描述】:
因为我不能在 ggplot 中使用 CM roman。
这行得通:
a <- ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
ggtitle("Fuel Efficiency of 32 Cars") +
xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") +
theme(text=element_text(size=16, family="Times New Roman"))
print(a)
但这不是
a <- ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
ggtitle("Fuel Efficiency of 32 Cars") +
xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") +
theme(text=element_text(size=16, family="CM Roman"))
print(a)
当我运行 fonts() 时,它告诉我 CM Roman 是其中一种字体。
【问题讨论】: