# Re: [S] \pi on x-axis

Bill Venables (wvenable@attunga.stats.adelaide.edu.au)
Fri, 5 Jun 1998 09:45:14 +0930

Erin Hodgess writes:

> If I want to plot a sine or cosine curve, is there a way to
> have \pi on the x-axis, please?

Yes, but like so many things now, it depends on whether you are
in the clutches of Bill Gates, Microsoft, S-PLUS 4.x and all that
WIMPy stuff or whether you are still relatively free of it... :-)

1. With S-PLUS 4.x (I believe) there are now quite extensive
facilities for changing fonts, making things subscripts and
superscripts, &c but someone else will have to give you the
details. It should be dead simple though.

2. For postscript devices there is Alan Zaslavsky's psfonts'
package on statlib that allows you to mix fonts, font sizes,
make a few rudimentary subscripts and superscripts &c. It's
simple and effective enough for most purposes. This applies
to both sides.

3. For LaTeX (or plain TeX) + dvips users there is effectively a
complete solution to the general problem of placing labels
with arbitrary mathematics, font and size changes, using the
full TeX paraphernalia if you like, that should be much better
known. It also applies to both sides.

It's called psfrag. There several ways of using it, but the
one I prefer is to put dummy labels on the graphics in S-PLUS,
save the result as a postscript file, insert it into the
document and use LaTeX and the psfrag perl script to replace
the dummy labels by the precise TeX fragment' you wish to
appear in each place. The result is usually exactly what you
require, and can match the fonts and style as closely as you
wish (or not).

The most recent version I can find (quickly) is Version 3.01
with release date November 27, 1996. It should be available
at any CTAN archive in

CTAN/macros/latex/contrib/supported/psfrag/

The author is Michael C. Grant <mcgrant@isl.stanford.edu>
FWIW I warmly recommend it.

Bill Venables.

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news