0

How can I color manually the y-axis title (using ggplot2).

The title and subtitle work but not the y-axis label.

labs(title = "Cat food brands: <span style='color:#FF4500;'>**8 brands decreased in sale**</span>",
       subtitle = "YEAR-OVER-YEAR % CHANGE IN SALE VOLUME ($)<br>",
       y = "DECREASED | INCREASED") 

Thank you very much ! bar graph

r2evans
  • 141,215
  • 6
  • 77
  • 149
Minh Dang
  • 11
  • 1
  • 3
    Have you looked into the ggtext package? https://rfortherestofus.com/2020/05/color-titles-ggtext/ – Susan Switzer Jul 15 '21 at 18:12
  • 4
    Not to mention the `ggtext` package vignettes directly, see https://cran.r-project.org/web/packages/ggtext/vignettes/theme_elements.html and scroll down to just *above* the "Text boxes" section. – r2evans Jul 15 '21 at 18:17

0 Answers0