Message-ID: <C29C2298-E2FC-49A3-9BDD-A0C554F3EB26@gmail.com>
Date: 2012-08-16T11:33:08Z
From: Peter Dalgaard
Subject: Variables and greek letters in a plot title
In-Reply-To: <CAEd+D4jV2+GvCMV1QZ0GRB_SDyZ=rU2CUNgOSOw1wi+X3MtfMg@mail.gmail.com>
On Aug 16, 2012, at 09:37 , Dominik Refardt wrote:
> Hello
>
> This is a problem I encountered repeatedly and I found no answer that made
> me really happy. I hope it is not too trivial.
>
> I would like to give the concentration of a substance in a plot title:
>
> 5 ug/ml substance
>
> the '5' would be a variable and the ug should be micrograms (with greek
> letter mu). It is the mu that causes the problems for me. I failed using
> various combinations of paste, expression and bquote. I would be very
> grateful if someone could help me (or point me to the solution, which I
> might have overlooked).
Like this?
plot(0,0)
conc <- 5
title(main=bquote(.(conc)*" "*mu*g/ml*" substance"))
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com