[R] ggplot complicated ylab

tri@g m@iii@g oii gvd@et@dk tri@g m@iii@g oii gvd@et@dk
Wed Dec 16 15:19:32 CET 2020


Thanks a lot!
exp <- expression(atop("Cumulative Na-Cl balance and",paste("(red)
",Delta,HCO[3]^"-","  (mmol)")))
did the trick!!!!


All best
Troels

-----Oprindelig meddelelse-----
Fra: R-help <r-help-bounces using r-project.org> På vegne af Jeff Newmiller
Sendt: 16. december 2020 14:17
Til: r-help using r-project.org; tring using gvdnet.dk; r-help mailing list
<r-help using r-project.org>
Emne: Re: [R] ggplot complicated ylab

Perhaps [1] has some useful ideas?

[1]
https://stackoverflow.com/questions/13223846/ggplot2-two-line-label-with-exp
ression

On December 16, 2020 5:02:59 AM PST, tring using gvdnet.dk wrote:
>Dear friends - I need an ylab on 2 lines -
>
>Here is what I want:
>
>exp <- expression(paste("Cumulative Na-Cl balance ","\n",
>
>                        "and (red) ",Delta,HCO[3]^"-","  mmol"))
>
>So if exp was OK ylab(exp) would work - but the "\n" doesn't seem to do 
>anything and it all comes on one line.
>
>I hope someone will point in the right direction
>
> 
>
>All best wishes
>
> 
>
>Troels Ring, Aalborg, Denmark
>
>
>This email has been scanned by BullGuard antivirus protection.
>For more info visit www.bullguard.com
><http://www.bullguard.com/tracking.aspx?affiliate=bullguard&buyaffiliat
>e=smt
>p&url=/>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


This email has been scanned by BullGuard antivirus protection.
For more info visit www.bullguard.com



More information about the R-help mailing list