[R] Perpendicular symbol in plotmath?
Gabor Grothendieck
ggrothendieck at gmail.com
Sun Apr 29 01:22:43 CEST 2007
I don't think you can mix plotmath and Hershey but you could do this:
plot(1, xlab = quote(epsilon))
z <- list(x = 1.00823, y = 0.4475955)
text(z$x, z$y, "\\pp", vfont = c("serif", "plain"), xpd = TRUE, cex = .7)
You can set z via:
z <- locator()
On 4/28/07, Matthew Neilson <matt at gneilson.plus.com> wrote:
> 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.
> >>
>
>
More information about the R-help
mailing list