. Advertisement .
..3..
. Advertisement .
..4..
In the process of completing my work, I encountered the following problem:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
Polygon edge not found
In addition: Warning messages:
1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "Arial"
2: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "Arial"
Below is the code I ran:
library(ggplot2)
qplot(mpg, wt, data=mtcars)
What’s causing it, and how can it be resolved in the “error in grid.call(c_textbounds, as.graphicsannot(x$label), x$x, x$y, : polygon edge not found“ in the r?
The cause: This error occurs because the arial font file had been disabled.
Solution: First you need to check to see whether
Arial.ttf
has been moved to the disabled fonts directory from the terminal:Then, let’s move it back to the active fonts directory.
You can log in, log out, then open the ‘Font Book’ application. Arial had been there before in my case, but it was the Microsoft version stored in /Library/fonts/Microsoft/. A yellow triangle may be shown next to the font name by Font Book, indicating that multiple copies of the font exist. Highlight the font name and chose the Resolve Duplicates command from the Edit menu. This will disable the Microsoft copy, which you can confirm by choosing one of the arial type faces (click the expand triangle next to the font name), click right on the one labelled Off, and choose Reveal in Finder, it will open a window to Microsoft fonts directory.
This happened to me, and I discovered that the arial font had been disabled. First, check if
Arial.ttf
was moved to the Disabled Fonts directory. From the terminal:If so, you can move it back into the active fonts directory.
Log out, log back in, and then open the Font Book application. In my case, although arial was already present, it was actually the Microsoft version stored in
/Library/fonts/Microsoft/
. Font Book might now display a yellow triangle near the font name. This indicates that multiple copies exist. Highlight the font name, and then choose theResolve Duplicates
command in theEdit
menu. This should disable Microsoft copy. To confirm, click the expand triangle next the font name, right-click onOff
and chooseReveal in Finder
. You will then be able to open the Microsoft fonts directory.