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&buyaffiliate=smt
p&url=/>
ggplot complicated ylab
3 messages · tri@g m@iii@g oii gvd@et@dk, Jeff Newmiller
Perhaps [1] has some useful ideas? [1] https://stackoverflow.com/questions/13223846/ggplot2-two-line-label-with-expression
On December 16, 2020 5:02:59 AM PST, tring at 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&buyaffiliate=smt
p&url=/>
[[alternative HTML version deleted]]
______________________________________________ R-help at 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.
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 at r-project.org> P? vegne af Jeff Newmiller
Sendt: 16. december 2020 14:17
Til: r-help at r-project.org; tring at gvdnet.dk; r-help mailing list
<r-help at 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 at 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 at 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 at 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