Just started R a couple weeks ago. Getting familiar with ggplot. I successfully made the graph I wanted to including all legends, axes titles, etc. I'm able to export/save this image fine. However, the assignment also required me to change the font used for the title, axes, legend text, etc. on the graph. To import the font I wanted to use, I used showtext as I saw this recommended when I Googled. When I use this, it does change the font to what I want. However, although I can see the entire graphs and its two legends fine in the Plot viewer, when I go to export it, the legend text is now cut off on the right. This appears to be the case as soon as I load the showtext package and use showtext_auto(), even if I just try to then recreate the graph using R's default font, not even with the new font. I've spent tons of time playing around and can't seem to resolve this. Please help. Also would be preferable if there is a more permanent way to get fonts into R rather than me having to load showtext and whatever font I want each and every time. Thank you very much.

0

There are 0 answers