[R] Perpendicular symbol in plotmath?
Paul Murrell
p.murrell at auckland.ac.nz
Tue May 1 01:40:06 CEST 2007
Hi
Matthew Neilson 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?
Unfortunately, you still cannot use Hershey fonts with plotmath (just
lacking implementation).
Also, the perpendicular symbol is not implemented in plotmath (yet).
In this case though, there may be a possible workaround. Try the
following ...
> plot(1, ann=FALSE)
> title(ylab=expression(epsilon["\136"]), family="symbol")
The plain text character "\136" gets drawn using the symbol font and the
perpendicular symbol is character 94 (Octal 136) in the Adobe Symbol
Encoding and in the Windows symbol font encoding so this works for PDF,
on Windows, and on X11 (though I had to switch to a single-byte encoding
to get my system to pick up the symbol font). The drawback with this
solution is that anything that is NOT a special mathematical symbol in
the expression will come out in Greek letters.
Paul
> 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.
>>>
>
> ______________________________________________
> 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.
--
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/
More information about the R-help
mailing list