[R] Text in Plots

Ross Ihaka ihaka@stat.auckland.ac.nz
Wed, 30 Jun 1999 08:51:20 +1200 (NZST)


On Tue, 29 Jun 1999, Friedrich Leisch wrote:

> 
> [ taken to r-devel ]
> 
> >>>>> On Tue, 29 Jun 1999 11:51:21 +0100,
> >>>>> Paul Murrell (PM) wrote:
> 
> PM> hi
> PM> ---snip---
> 
> PM> Dear R-users,
> PM> I have two problems:
> PM> 1) In producing mathematical notation in plots I can not produce the
> PM> italic version of greek symbols. That is
> PM>     mtext(text=expression(mu[i]))
> PM> gives the same as
> PM>     mtext(text=expression(italic(mu[i])))
> PM> Is this a bug or a specifity of my machine (R 0.63.2, Linux 2.0.36,
> PM> i686)?
> 
> PM> 2) I would like to add x and ylabels in boxplots. Is there a way to
> PM> do this? I tried:
> PM>     bxp(bpdata, xlab="Size Classes", ylab="Cash Flow")
> PM> ---snip---
> 
> PM> 1)  this is a "feature";  the only available fonts at present are plain,
> PM> bold, italic, bolditalic, and symbol.
> 
> Hmm, are we sure that this is a "feature"? The most common use for
> greek symbols is in equation and the most common word processor for R
> users is (hopefully/probably/maybe) LaTeX ... and greek letters in
> LaTeX equations are italic ... hence shouldn't we make them available
> (if possible)?
> 
> But I must admit that I obviously didn't need it before ... :-)

The problem is that the two initial targets for the equation stuff (X11
and PostScript -- do not come with anything other than a plain symbol
font. In principle there is no problem adding italic and bold Greek (and
other symbols), but most devices don't support them (does windows have
bold and italic versions of its symbol font?).

XFig is in a similar situation.

There are publically available Adobe Type1 versions of the TeX computer
modern fonts and this may provide a way of doing math in plots, but I
suspect that plots annotated in computer modern would be pretty ugly.


	Ross

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._