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 22:25:29 +0000 (GMT)

On Sat, 23 Feb 2008, Kenneth Takagi wrote:

> Thanks for your help. I tried par(family="serif") and it worked well.
> I'm running R 2.6.1, on windows XP machine. font=6 appears to be
> similar to times new roman or serif, they appear to be very similar (to
> my untrained eye). Serif seems to work fine for my needs!

It is 'Times New Roman' unless you altered it: see etc/Rdevga. And that is what 'serif' maps to

>
> Thanks,
> Ken
>
> Kenneth Takagi
> MS Student
> Crop and Soil Sciences
> 412 ASI Building
> University Park, PA 16802
> Ph: (814)-863-7638
>
>
>
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley_at_stats.ox.ac.uk]
> Sent: Sat 2/23/2008 2:05 AM
> To: Kenneth Takagi
> Cc: r-help_at_r-project.org
> Subject: Re: [R] How to Include greek symbol in axis label?
>
> 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
>
>

-- 
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 - 22:39:41 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 Sun 24 Feb 2008 - 04:30:16 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