0

I want to make a legend title reading

 CO₂-text1
   text2

Since paste()/paste0() doesn't seem to work on expression I also tried using bquote() instead, but can't figure a way to add the new line. My most succesfull attempt so far:

expression("CO"[2]*"-text1 \n"*" text2")

, which results in

     -text1
 CO₂         text2
Hope
  • 143
  • 11
  • Similar question posted here https://stackoverflow.com/questions/20549337/expression-and-new-line-in-plot-labels (somehow the solution does not work with my problem, but might be help someone else) – Hope Mar 13 '20 at 09:53

1 Answers1

0
expression(atop("CO"[2]~"text1",text2))

solved the issue (see question-comments).

Hope
  • 143
  • 11