wilkelab / ggtext

Improved text rendering support for ggplot2
https://wilkelab.org/ggtext/
GNU General Public License v2.0
650 stars 37 forks source link

HTML not rendered #98

Closed Filippo-94 closed 1 year ago

Filippo-94 commented 1 year ago

Hi,

I red the documentation and I know only basic HTML works. I have multiple scripts and I used to change color to title, but suddenly stopped.

Thank you, Filippo


Versions: Tidyverse: 1.3.2 ggplot: 3.4.0 ggtext: 0.1.2 R: 4.2.2 Rstudio: 2022.02.3 MacOS: 13.0.1

I tried to downgrade R to 4.2.0, ggplot to 3.3.5 and also remotes::install_github("wilkelab/ggtext") I couldn't get it to work


library(tidyverse)
library(ggtext)

mtcars %>% 
  ggplot(aes(cyl, disp))+
  geom_point()+
  labs(title = "Is my title <span style=color:'red'>rendered</span>?")+
  theme(plot.title = element_markdown())

084fc7c5-4ec4-43ef-b383-58eeb1dede87

Filippo-94 commented 1 year ago

My fault: style=color:'red' is not correct. This fix: style='color:red'