[R] mathematical expression in legend
ligges at statistik.uni-dortmund.de
Wed Mar 13 08:58:44 CET 2002
Arne Mueller wrote:
> On Wed, 13 Mar 2002, Paul Murrell wrote:
> > Hi
> > > I'm trying to put a mathematical expression into a legend, but R
> > > complains about a syntax error. Basically i'd like to do this:
> > >
> > > legend.text = c(expression(x < 10), expression(x >= 10))
> > The following works for me on 1.4.0 (yukky alignment which should be fixed
> > in 1.4.1) ...
> yes, thanks, the stuff below does what I want. However, the legend text is
> now shifted to the top relative to the symbols of the legend. This
> probably what you mean with 'yukky' alignment? I'm running 1.4.1 :-(
Paul himself fixed the bug on Feb 12 for R-devel (to be 1.5.0 on April
29, as far as I know).
R-1.4.1 was released on Jan 30.
As a workaround specify the adjustment manually:
legend(..., adj=c(0, 0.5))
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help