I'm running code on a new computer (Windows 10 Enterprise OS) with R 4.2.2. I'm running code I've been using for years, but on the new system, my plot shows little white rectangles instead of plotmath symbols.
I've seen several people running into this, with fixes for Mac (here) and Linux (here). Using the cairo option, as proposed here works ok for the exported plots but is extremely slow-rendering for in-console plotting.
I would like to be able to add the missing fonts in, but I can't seem to figure out how to. Here's what I get when I run demo(plotmath)
.
I seem to only have "Symbol Regular.ttf" font file in my Fonts folder under C\Windows. That is, I don't have a "Symbol.ttf" file. When I open it, there are no multiplication, less-than-or-equal, not equal, etc symbols in it.
Any help would be appreciated!
EDIT This doesn't seem to be a ttf issue, but rather an R issue. Code that works fine on R 4.2.1 doesn't work on R 4.2.2 on the same computer. Toy example below, and a screenshot of the session info and plots are provided. I highlighted the only 2 differences in package versions that I could see. Any help would be appreciated...
library(ggplot2)
df <- data.frame(x = 1:10, y = 11:20, Eq = "WT == 10%*%10^3%*%x^5")
ggplot() +
geom_point(data = df, aes(x = x, y = y)) +
geom_text(data = df[1,],
aes(x = x, y = 20, label = Eq), size = 2.7, parse = TRUE, hjust = 0, show.legend = FALSE)