Re: [R] mathematical symbols in plots

From: Christoph Buser <buser_at_stat.math.ethz.ch>
Date: Thu 04 Jan 2007 - 07:50:32 GMT

Dear Sebastian

plot(1:10, 1:10)
text(4, 9, expression(paste("<", k, ">")))

should work here.

Best regards,

Christoph


Credit and Surety PML study: visit our web page www.cs-pml.org



Christoph Buser <buser@stat.math.ethz.ch> Seminar fuer Statistik, LEO C13
ETH Zurich	8092 Zurich	 SWITZERLAND
phone: x-41-44-632-4673		fax: 632-1228

http://stat.ethz.ch/~buser/

Sebastian Weber writes:
> Hello everyone!
>
> I'm trying to plot some mathematical expression along my axis, but
> demo(plotmath) did not have the symbol I was looking for. In particular,
> I would like to denote the mean of an observable by writing
>
> <k>
>
> which I tried to enter with
>
> expression(group("<", k, ">"))
>
> However, my naive try doesn't work and the help doesn't want to tell me,
> does someone know?
>
> And here another one: How can I sepcify which fonts get used with which
> R prints those mathematical symbols? Since I finally include my plots in
> latex-documents as eps, I would love to use the same font-encoding for
> all postscript stuff. A problem in the past has been, that R embedded
> it's own font within the ps-files generated. These were not compatible
> with the fonts used at the magazine where I published my document. This
> lead to quite some confusion as \gamma became g and so on. Any solution
> to this problem? Any hint? As I'm not too much into font-encoding, I
> have actually no real clue where to even start searching.
>
> Thank you very much for any help.
>
> Greetings,
>
> Sebastian Weber
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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 Thu Jan 04 18:55:55 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 04 Jan 2007 - 08:30:25 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.