繪圖過程反復(fù)出現(xiàn)
Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found
說是R中沒有arial字體,想要R可以用電腦中的字體棵癣,谷歌說 extrafont 可以整航棱,整半天不明白鲤拿。找了另一種方法鳍怨。
電腦系統(tǒng):macOS Big Sur
R version : 3.6.3
# https://stackoverflow.com/questions/55933524/r-can-not-find-fonts-to-be-used-in-plotting
install.packages("showtext")
library(showtext)
#下載arial字體 https://www.freefontspro.com/cn/14454/arial.ttf
font_add('Arial', '/Users/Downloads/Arial.ttf')#使用自己的路徑
showtext_auto()
運(yùn)行上述代碼后就出圖了齿穗。