Re: [R] Sys.setlocale() and text()

From: Ed Merkle <edgar.merkle_at_wichita.edu>
Date: Wed, 12 Dec 2007 09:20:30 -0600

Thanks very much for the response. I think I left out an important detail, however.

I want my lowercase sigma to be displayed in a specific font from the Rdevga file (my project involves fonts). So far as I know, quote() does not allow me to select a font. Thus, I am specifically interested in the text() command and reasons why my example code performs differently in R 2.3.0 vs 2.6.1.

Thanks,
Ed

Gabor Grothendieck wrote:
> Try this:
>
> plot(1:10, main = quote(sigma ^ 2))
>
>
> On Dec 11, 2007 10:09 PM, Ed Merkle <edgar.merkle_at_wichita.edu> wrote:
>> Dear HelpeRs,
>>
>> I have a question about the Sys.setlocale() command and plotting. I am
>> running Windows XP, with R 2.6.1. My default locale is English_United
>> States.1252.
>>
>> I am trying to add a lowercase sigma to a plot using the following code:
>>
>> Sys.setlocale("LC_CTYPE","greek")
>> plot(1:10,1:10)
>> text(4,3,"\xF3")
>>
>>
>> For R 2.6.1, this code gives me the glyph from my default (1252) instead
>> of from the 1253 codes. For an older version of R (2.3.0) on the same
>> computer, this code gives me the lowercase sigma that I wanted. I have
>> been unable to pinpoint what has changed. Thanks for the help, and I
>> apologize if I am missing something obvious.
>>
>>
>> --
>> Ed Merkle, PhD
>> Assistant Professor
>> Dept. of Psychology
>> Wichita State University
>> Wichita, KS 67260
>>
>> ______________________________________________
>> 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.
>>
>



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 Wed 12 Dec 2007 - 15:22:32 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 Wed 12 Dec 2007 - 18:30:19 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.