[R] How to Include greek symbol in axis label?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Feb 23 08:05:37 CET 2008
On Fri, 22 Feb 2008, Kenneth Takagi wrote:
> Hi, I'm fairly new to R, so hopefully this is an easy question...
Sorry, no as you haven't given us the minimum information asked for in the
posting guide and we are reduced to attempted mind reading.
What is 'font=6'?
R only has font = 1 to 5. There is an extension on the windows() device
only (but you have not mentioned an OS): nowadays the use of
par(family=) is preferred. So a likely answer is to use
par(family="serif")
BTW, this is not a 'greek character'. It is the mathematical symbol phi,
and that is distinct from the Greek character, and not in whatever
'font=6' is.
> On a plot, I would like to have the y label read: "Response(phi)" with
> phi = the greek character. From old posts I've found this:
>
> title(ylab=expression(paste("Response (", phi, ")")))
>
> This displays nicely, but in the default font. I would like to use
> font=6 (which is the font of the other labels, title, etc.). Is there
> an way to display the y-label in font=6 and still include the greek
> character? Is there an easier way to do this?
>
> Thanks for your help!
>
> Ken
> kat215 at psu.edu
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list