Hi
Michael Grottke wrote:> Hello,
>
> Some time ago, I discovered the possibility of using mathematical
> symbols for axis labels etc. In order ensure consistency between text
> and graphics of some paper, I would like to include the calligraphic H
> (obtained in LaTeX via \mathcal{H}) in several diagrams. Is there any
> way to do so? Is it in general possible to use further mathematical
> fonts like \mathbb and \mathbf in R?
Mostly no. I don't suppose the Hershey script font is close enough? e.g.,
plot.new()
text(.5, .5, "F", vfont=c("script", "plain"))
On some devices, it is possible to set a custom font family (e.g., you
may be able to produce a postscript file with a Type 1 version of the
mathcal font), but this is only per-file if at all (e.g., it would make
all text in the file mathcal). An exception is the windows device --
extra fonts can be set up (see the file $RHOME/etc/devga) and accessed
via the "font" parameter. e.g.,
plot(1:20, type="n")
text(1:20, 1:20, "F", font=1:20)
In this case, if you can get a True Type version of the mathcal font,
and set it up properly, then you should be able to do just the text you
want.
Greater flexibility in the specification of fonts is in the pipeline,
but is at least an R version away.
HTH
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/