Skip to content

Variables and greek letters in a plot title

7 messages · Miguel Manese, S Ellison, Peter Dalgaard +2 more

#
Hi Dominik,

You can try

x <- 5
plot(rnorm(50), main=bquote(.(x) * mu * g/m^3 * " substance"))

Regards,

- Jon

On Thu, Aug 16, 2012 at 3:37 PM, Dominik Refardt
<dominik.refardt at gmail.com> wrote:
#
Examples of including a variable in text are given in the ?plotmath page, under " ## How to combine "math" and numeric variables".

For your case, 
plot(1:10)
conc=5
title(main=bquote(.(conc)~mu*"g/ml substance")) 

works.

S

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
#
On Aug 16, 2012, at 09:37 , Dominik Refardt wrote:

            
Like this?

plot(0,0)
conc <- 5
title(main=bquote(.(conc)*" "*mu*g/ml*" substance"))
#
plot(rnorm(50), main=bquote(.(x)*" "* mu * g/m^3 * " substance"))


John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!