Hello, R users. I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4 in R plots, e.g. in xlab, ylab or legend. How can I do that? Thank you in advance.
Hi KARAVASILIS GEORGE wrote:> Hello, R users. > I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4 > in R plots, e.g. in xlab, ylab or legend. > How can I do that? > Thank you in advance.See http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html and "Non-standard fonts in PostScript and PDF graphics" in http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf Paul> ______________________________________________ > 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.-- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/
KARAVASILIS GEORGE wrote:> > Hello, R users. > I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4 > in R plots, e.g. in xlab, ylab or legend. > How can I do that? > Thank you in advance. > >A colleague and I have developed a package called pgfSweave that turns R plots created inside a Sweave document into code that can be interpreted by PGF/TikZ package for LaTeX. The end result of this process is that the text in your figures are typeset with the same fonts used in the rest of your TeX document. The package can be found at: http://r-forge.r-project.org/projects/pgfsweave/ It has been used by the authors to typeset academic papers on windows and produces good results. However we are still classifying it as an alpha product because it has not been tested extensively. Currently the underlying utility that translates R graphics into PGF form is the java utility eps2pgf which may be found at: http://sourceforge.net/projects/eps2pgf/ You may be interested in using this utility by it's self if you just want to prep graphics for LaTeX and don't want to use Sweave. Simply create your graphs in R using the eps() driver and process them using eps2pgf. eps2pgf has some drawbacks- it takes a few seconds to translate a graph and certain R graphics commands, such as setting text size using cex, are not respected. Good luck! -Charlie ----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/Tex-fonts-in-R-plots-tp24382492p24414007.html Sent from the R help mailing list archive at Nabble.com.