Re: [R] in other words Re: How to use fixed-width fonts such as courier in R
Great. Thanks a lot. That is exactly what I need. Xiang On Wed, 25 May 2005, Paul Murrell wrote: > Hi > > Does this do what you want? > > postscript("example.ps", fonts=c("sans", "mono")) > plot(1:10, axes=FALSE, ann=FALSE) > par(family="sans") # By default Helvetica which is like Arial > title(xlab="sans serif axis label") > title(ylab="bold sans serif axis label", font.lab=2) > par(family="mono") # By default Courier > axis(1, > at=seq(2, 8, 2), > label=c("mono", "space", "tick", "labels")) > axis(2, > at=seq(2, 10, 2), > label=c("bold", "mono", "space", "tick", "labels"), > font.axis=2) > box() > dev.off() > > You might also want to take a look at the article "Fonts, lines, and > transparency ..." in R News 4/2 > http://cran.stat.auckland.ac.nz/doc/Rnews/Rnews_2004-2.pdf > > Paul > > > Xiang Li wrote: > > the problem is how to use both courier bold font for axis and arial > > bold font for labelling. If I use familiy = "courier" in postscript, > > everything will become courier fonts .. > > > > I noticed that in postscirpt help page, we can customize a family such as > > "family = c("CM_regular_10.afm","CM_boldx_10.afm", "cmti10.afm", > > "cmbxti10.afm", "CM_symbol_10.afm"; > > > > However, I tried many times, and just don't know the symbol used in R for > > courier bold or arial bold, etc. > > > > > > > > > >>Hi, > >> I am trying to use Arial bold for labelling (font.lab =2), and use > >>the fixed-width Courier bold for axis. I will export the plot to .ps > >>format. I have been trying to use font.axis = 11, but that doesn't work > >>when I exported the plot to a .ps file. > >> > >> I have been trying hard to read the help page of "postscript" these few > >>days, but didn't get the courier font yet. Can you please help me > >>figure out how I should use "postscript"? Thanks! > >> > >>Best > >> > >>Sean > >> > > > > > > __ > > 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 > > > -- > Dr Paul Murrell > Department of Statistics > The University of Auckland > Private Bag 92019 > Auckland > New Zealand > 64 9 3737599 x85392 > [EMAIL PROTECTED] > http://www.stat.auckland.ac.nz/~paul/ > __ 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
[R] in other words Re: How to use fixed-width fonts such as courier in R
the problem is how to use both courier bold font for axis and arial bold font for labelling. If I use familiy = "courier" in postscript, everything will become courier fonts .. I noticed that in postscirpt help page, we can customize a family such as "family = c("CM_regular_10.afm","CM_boldx_10.afm", "cmti10.afm", "cmbxti10.afm", "CM_symbol_10.afm"; However, I tried many times, and just don't know the symbol used in R for courier bold or arial bold, etc. > Hi, > I am trying to use Arial bold for labelling (font.lab =2), and use > the fixed-width Courier bold for axis. I will export the plot to .ps > format. I have been trying to use font.axis = 11, but that doesn't work > when I exported the plot to a .ps file. > > I have been trying hard to read the help page of "postscript" these few > days, but didn't get the courier font yet. Can you please help me > figure out how I should use "postscript"? Thanks! > > Best > > Sean > __ 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
[R] How to use fixed-width fonts such as courier in R
Hi, I am trying to use Arial bold for labelling (font.lab =2), and use the fixed-width Courier bold for axis. I will export the plot to .ps format. I have been trying to use font.axis = 11, but that doesn't work when I exported the plot to a .ps file. I have been trying hard to read the help page of "postscript" these few days, but didn't get the courier font yet. Can you please help me figure out how I should use "postscript"? Thanks! Best Sean __ 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
Re: [R] How to show the symbol of Angstrom ?
Paul, Thank you very much! They all works! Sean On Tue, 14 Sep 2004, Paul Murrell wrote: > Hi > > > xiang li wrote: > > Also, I am wondering if there is any source where the expressions of > > many symbols are collected. > > Thanks you very much!!! > > > (Assuming you mean draw the angstrom symbol on a plot ...) > > There are several ways: > > (i) Specify the character code in octal. Assuming ISO Latin 1 encoding, > something like ... >plot(1, type="n") >text(1, 1, "\305") > ... or ... >grid.newpage() >grid.text("\305") > ... should work. That should be ok on default setups for Windows and > Unix. On the Mac it might have to be "\201" (untested) See, e.g., > http://czyborra.com/charsets/iso8859.html#ISO-8859-1 (Unix) > http://www.microsoft.com/typography/unicode/1252.gif (Windows) > http://kodeks.uni-bamberg.de/Computer/CodePages/MacStd.htm (Mac) > for other standard "symbols". > > (ii) Use a mathematical expression. This won't look as good because the > ring and the A are not a single coherent glyph, but it should work > "everywhere" ... >plot(1, type="n") >text(1, 1, expression(ring(A))) > ... or ... >grid.newpage() >grid.text(expression(ring(A))) > ... demo(plotmath) shows the range of things you can do with this approach. > > (iii) Use a hershey font (again, should work on all platforms and > encodings) ... >plot(1, type="n") >text(1, 1, "\\oA", vfont=c("sans serif", "plain")) > ... or ... >grid.newpage() >grid.text("\\oA", gp=gpar(fontfamily="HersheySans")) > ... demo(Hershey) shows the symbols available with this approach. > > Hope that helps. > > Paul > -- Li, Xiang (Sean) | [EMAIL PROTECTED] Dept of Bioengineering, SEO, MC 063 | ph: (312) 355-2520 University of Illinois at Chicago | fax: (312) 996-5921 Chicago, IL 60607-7052, USA | __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to show the symbol of Angstrom ?
Also, I am wondering if there is any source where the expressions of many symbols are collected. Thanks you very much!!! Li, Xiang(Sean) __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html