Dear List,
I am trying to label a plot with the symbol +/- sigma. Using something like
- expression (2*sigma) gives me the symbol 2ó. However, adding +/- to it
beats me.
The code I am using is: plot(x,y,type="l",main="
expression(paste("±",
plain(2*ó)),sep="").
Any suggestion will be appreciated.
Best
Ogbos
[[alternative HTML version deleted]]
Hi,
You may try something like:
plot(rnorm(10), rnorm(10), main=expression("" %+-% 2*sigma))
HTH,
Yves
Le 27/07/2011 14:57, ogbos okike a écrit :> Dear List,
> I am trying to label a plot with the symbol +/- sigma. Using something like
> - expression (2*sigma) gives me the symbol 2ó. However, adding +/- to it
> beats me.
> The code I am using is: plot(x,y,type="l",main="
expression(paste("±",
> plain(2*ó)),sep="").
> Any suggestion will be appreciated.
> Best
> Ogbos
>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> 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.
[[alternative HTML version deleted]]
On Jul 27, 2011, at 8:57 AM, ogbos okike wrote:> Dear List, > I am trying to label a plot with the symbol +/- sigma. Using > something like > - expression (2*sigma) gives me the symbol 2?. However, adding +/- > to it > beats me. > The code I am using is: plot(x,y,type="l",main=" > expression(paste("?", > plain(2*?)),sep=""). > Any suggestion will be appreciated.1) If you are getting errors then you should post them. 2) There is no `sep =` argument in plotmath's paste function. 3) It is an error to put double quotes before the `expression` function call. 4) once those errors are corrected the "?" is properly rendered in the title.> Best > Ogbos > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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.David Winsemius, MD West Hartford, CT