相关疑难解决方法(0)

无法更改ggplot/geom_text中的字体

我无法在geom_text中设置我的字体.这是我尝试过的:

    labels_test<-data.frame(a=c("a","b","c"),b=c(1:3),c=c(3:1))
    # works
    ggplot () + geom_text(data=labels_test,aes(b,c,label=a),color="blue")
    # does not work: 
    ggplot () + geom_text(data=labels_test,aes(b,c,label=a),color="blue",family="Times")
    # error message:  In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,:
    # Font family not found in Windows font database
Run Code Online (Sandbox Code Playgroud)

我已经进口的所有字体指示在这里.什么问题还有什么问题?

r ggplot2

39
推荐指数
3
解决办法
2万
查看次数

标签 统计

ggplot2 ×1

r ×1