Re: [R] How to Include greek symbol in axis label?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 23 Feb 2008 07:05:37 +0000 (GMT)

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

______________________________________________
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.
Received on Sat 23 Feb 2008 - 07:15:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Feb 2008 - 22:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive