0

I'm using some very basic styling of ggplot text, and using ggtext and element_markdown to style them. This type of code seems like it should work, but for some reason it just doesn't work on my macbook. I'm wondering if this is something to do with mac or a more general/R problem? I see no reason why this shouldn't render the text in italics:

ggplot() +
  labs(title = "I want *this* to be italicised") +
  theme(
    aspect.ratio = .2,
    plot.title = element_markdown()
  )

Also linking a screenshot to show how it is not working for me. Nor does it work if I save it as a png.

enter image description here

The versions of things I'm using are: R version 4.2.1 (2022-06-23)

RStudio 2022.02.3+492 "Prairie Trillium" Release (1db809b8323ba0a87c148d16eb84efe39a8e7785, 2022-05-16) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 12_3_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36

ggtext version 0.1.1

Apple M1 Max MacOS Monterey

Jamie
  • 401
  • 3
  • 11
  • Have a look at https://github.com/wilkelab/ggtext/issues/89. A possible fix suggested there would be to install the dev version of `gridtext`. – stefan Aug 12 '22 at 09:06
  • Yes, doing this: remotes::install_github("wilkelab/gridtext") and then restarting the r session worked! Feel free to post as a solution or I can do so - thank you! – Jamie Aug 12 '22 at 09:24

0 Answers0