1) I need to plot a legend containing the mathematical symbol greater- than-or-equal sign. And I want the text to start with that symbol. plot(110, 0.8) categories <- expression(blank >= 85, 84.9 - 80, 79.9 - 75, 74.9 - 70, 69.9 - 65, 64.9 - 60, blank< 60) legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) What I want is just ">=85" to be printed, but without something (here "blank") in front it is no correct expression. 2) Also I want German type decimals, that is a comma instead of a point. But the problem is, that the comma is used as argument separator in expression. plot(110, 0.8) categories <- expression(blank >= 85, 84,9 - 80, 79,9 - 75, 74,9 - 70, 69,9 - 65, 64,9 - 60, blank< 60) legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) This does obviously not work. Any ideas? Thanks, Mark ??????????????????????????????????????? Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstra?e 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com
On Feb 13, 2010, at 1:13 PM, Mark Heckmann wrote:> 1) I need to plot a legend containing the mathematical symbol > greater-than-or-equal sign. > And I want the text to start with that symbol. > > plot(110, 0.8) > categories <- expression(blank >= 85, 84.9 - 80, 79.9 - 75, 74.9 - > 70, 69.9 - 65, 64.9 - 60, blank< 60) > legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) > > What I want is just ">=85" to be printed, but without something > (here "blank") in front it is no correct expression. > > 2) Also I want German type decimals, that is a comma instead of a > point. > But the problem is, that the comma is used as argument separator in > expression. > > plot(110, 0.8) > categories <- expression(blank >= 85, 84,9 - 80, 79,9 - 75, 74,9 - > 70, 69,9 - 65, 64,9 - 60, blank< 60) > legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE)Try: > plot(110, 0.8) > categories <-legend(110, 0.8, c( expression(" ">= " 85"), "84,9 - 80", "79,9 - 75", "74,9 - 70", "69,9 - 65", "64,9 - 60", expression(" "<" 60")) + , lty=1:7, lwd=3, col=1, merge=TRUE) The commas inside quotes do not cause problems.> > This does obviously not work. Any ideas? > > Thanks, > Mark > ??????????????????????????????????????? > Mark Heckmann > Dipl. Wirt.-Ing. cand. Psych. > Vorstra?e 93 B01 > 28359 Bremen > Blog: www.markheckmann.de > R-Blog: http://ryouready.wordpress.com > > ______________________________________________ > 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 Heritage Laboratories West Hartford, CT
On Feb 13, 2010, at 1:45 PM, David Winsemius wrote:> > On Feb 13, 2010, at 1:13 PM, Mark Heckmann wrote: > >> 1) I need to plot a legend containing the mathematical symbol >> greater-than-or-equal sign. >> And I want the text to start with that symbol. >> >> plot(110, 0.8) >> categories <- expression(blank >= 85, 84.9 - 80, 79.9 - 75, 74.9 - >> 70, 69.9 - 65, 64.9 - 60, blank< 60) >> legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) >> >> What I want is just ">=85" to be printed, but without something >> (here "blank") in front it is no correct expression. >> >> 2) Also I want German type decimals, that is a comma instead of a >> point. >> But the problem is, that the comma is used as argument separator in >> expression. >> >> plot(110, 0.8) >> categories <- expression(blank >= 85, 84,9 - 80, 79,9 - 75, 74,9 - >> 70, 69,9 - 65, 64,9 - 60, blank< 60) >> legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) > > Try: > > plot(110, 0.8) > > categories <-legend(110, 0.8, c( expression(" ">= " 85"), > "84,9 - 80", "79,9 - 75", "74,9 - 70", "69,9 - 65", "64,9 - 60", > expression(" "<" 60")) > + , lty=1:7, lwd=3, col=1, merge=TRUE) >That worked because of side-effects. Better might be: categories <- c( expression(" " >= " 85"), "84,9 - 80", "79,9 - 75", "74,9 - 70", "69,9 - 65", "64,9 - 60", expression(" " < " 60")) plot(110, 0.8) legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE)> The commas inside quotes do not cause problems. > >> >> This does obviously not work. Any ideas? >> >> Thanks, >> Mark >> ??????????????????????????????????????? >> Mark Heckmann >> Dipl. Wirt.-Ing. cand. Psych. >> Vorstra?e 93 B01 >> 28359 Bremen >> Blog: www.markheckmann.de >> R-Blog: http://ryouready.wordpress.com >> >> ______________________________________________ >> 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 > Heritage Laboratories > West Hartford, CT > > ______________________________________________ > 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 Heritage Laboratories West Hartford, CT
On Sat, 2010-02-13 at 13:57 -0500, David Winsemius wrote:> On Feb 13, 2010, at 1:45 PM, David Winsemius wrote: > > > > > On Feb 13, 2010, at 1:13 PM, Mark Heckmann wrote: > > > >> 1) I need to plot a legend containing the mathematical symbol > >> greater-than-or-equal sign. > >> And I want the text to start with that symbol. > >><snip />> > Try: > > > plot(110, 0.8) > > > categories <-legend(110, 0.8, c( expression(" ">= " 85"), > > "84,9 - 80", "79,9 - 75", "74,9 - 70", "69,9 - 65", "64,9 - 60", > > expression(" "<" 60")) > > + , lty=1:7, lwd=3, col=1, merge=TRUE) > > > That worked because of side-effects. Better might be: > > categories <- c( expression(" " >= " 85"), "84,9 - 80", "79,9 - > 75", "74,9 - 70", "69,9 - 65", "64,9 - 60", expression(" " < " 60")) > > plot(110, 0.8) > legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE)The OP might also like to look at phantom() in ?plotmath to control the extra spacing required for "blank". HTH G> > > > The commas inside quotes do not cause problems. > > > >> > >> This does obviously not work. Any ideas? > >> > >> Thanks, > >> Mark > >> ??????????????????????????????????????? > >> Mark Heckmann > >> Dipl. Wirt.-Ing. cand. Psych. > >> Vorstra?e 93 B01 > >> 28359 Bremen > >> Blog: www.markheckmann.de > >> R-Blog: http://ryouready.wordpress.com > >> > >> ______________________________________________ > >> 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 > > Heritage Laboratories > > West Hartford, CT > > > > ______________________________________________ > > 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 > Heritage Laboratories > West Hartford, CT > > ______________________________________________ > 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.-- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%