Hey, Does anyone know of an equivalent to the LaTeX \perp (perpendicular) symbol for adding to R plots? Parallel is easy enough ("||"), but I haven't been able to find a way of adding perpendicular. The plotmath documentation doesn't mention how to do it, so I'm inclined to think that it doesn't exist - but surely there must be some way of achieving the desired result, right? Any help will be much appreciated, -Matt
Its available in the Hershey fonts: plot(0, 0, type = "n") text(0, 0, "A \\pp B", vfont = c("serif", "plain")) On 4/28/07, Matthew Neilson <matt at gneilson.plus.com> wrote:> Hey, > > Does anyone know of an equivalent to the LaTeX \perp (perpendicular) > symbol for adding to R plots? Parallel is easy enough ("||"), but I > haven't been > able to find a way of adding perpendicular. The plotmath documentation > doesn't mention how to do it, so I'm inclined to think that it doesn't > exist - but surely there must be some way of achieving the desired > result, > right? > > Any help will be much appreciated, > > > -Matt > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >
Thanks for your response, Gabor. That works quite nicely. The documentation states that it is not possible to mix and match Hershey fonts with plotmath symbols. My *ideal* scenario would be to write the perpendicular symbol as a subscript (specifically, I would like to have " \epsilon_{\perp} " as an axis label). I have searched the help archive, and it turned up the following post from 2002: http://tinyurl.com/2m8n9c which explains a way of "faking" subscripts when using the Hershey fonts, though it does have several drawbacks. Have things moved on in the last five years, or is this still the best known solution? Many thanks for your help, -Matt On Sat Apr 28 17:35 , 'Gabor Grothendieck' <ggrothendieck at gmail.com> sent:>Its available in the Hershey fonts: > >plot(0, 0, type = "n") >text(0, 0, "A \\pp B", vfont = c("serif", "plain")) > > >On 4/28/07, Matthew Neilson matt at gneilson.plus.com> wrote: >> Hey, >> >> Does anyone know of an equivalent to the LaTeX \perp (perpendicular) >> symbol for adding to R plots? Parallel is easy enough ("||"), but I >> haven't been >> able to find a way of adding perpendicular. The plotmath documentation >> doesn't mention how to do it, so I'm inclined to think that it doesn't >> exist - but surely there must be some way of achieving the desired >> result, >> right? >> >> Any help will be much appreciated, >> >> >> -Matt >> >> ______________________________________________ >> R-help at stat.math.ethz.ch 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. >>
Hi Gabor Grothendieck wrote:> On 4/30/07, Paul Murrell <p.murrell at auckland.ac.nz> wrote: >> though I had to switch to a single-byte encoding >> to get my system to pick up the symbol font > > Exactly what command did you use to do that?Sorry, that should have read "switch to a single-byte locale", which for me meant ... Sys.setlocale(locale="en_NZ.iso88591") Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/