Dear All, I know how to export graphics as pdf files and then how to include them in LaTeX documents. However, I do not know how to do in order to have the text of the graphics written with the font selected for the LaTeX document. Is that possible? Thanks in advance, Paul
Dietrich Trenkler
2007-Sep-28 12:06 UTC
[R] Graphics and LaTeX documents with the same font
Paul Smith schrieb:> Dear All, > > I know how to export graphics as pdf files and then how to include > them in LaTeX documents. However, I do not know how to do in order to > have the text of the graphics written with the font selected for the > LaTeX document. Is that possible? > > Thanks in advance, > > 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. > >Hi Paul, maybe you will find the psfrag package useful. Dietrich -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: Dietrich.Trenkler at Uni-Osnabrueck.de
Prof Brian Ripley
2007-Sep-28 12:42 UTC
[R] Graphics and LaTeX documents with the same font
On Fri, 28 Sep 2007, Paul Smith wrote:> Dear All, > > I know how to export graphics as pdf files and then how to include > them in LaTeX documents. However, I do not know how to do in order to > have the text of the graphics written with the font selected for the > LaTeX document. Is that possible?Well, it depends on what that font is. But if it is TeX font, see the section called 'TeX fonts' in ?postscript and the detailed description in the article in R-news 6/2 by Paul Murrell and myself. If it is an Adobe Type1 font such as Times New Roman, just specify an appropriate family in the pdf() call. Dietrich Trenkler wrote:> maybe you will find the psfrag package useful.I doubt it will be even usable with PDF (there are pdfrack and Xfigfrag, though), and with postscript it is at best a kludge as R does its own micro-positioning of text based on the font metrics. -- 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
Henrik Bengtsson
2007-Sep-28 20:11 UTC
[R] Graphics and LaTeX documents with the same font
On 9/28/07, hadley wickham <h.wickham at gmail.com> wrote:> > Yes there is harm. But to make bold lines, easy to read titles is fine. > > See the spar function in > > http://biostat.mc.vanderbilt.edu/SgraphicsHints for a starter. Also see > > the setps, ps.slide, and setpdf functions in the Hmisc package. > > I was interested to see that you have code for drawing scatterplots > with multiple y-axes. As far as I know the only legitimate use for a > double-axis plot is to confuse or mislead the reader (and this is not > a very ethical use case). Perhaps you have a counter-example?Eh... How about all cases where you plot against one variable but want to show it in different units, e.g. temperature in degrees of Celsius/Centigrades on one and degrees on Fahrenheit on the other? I would say that is a case where you rather want to help the reader, not mislead her/him. -Henrik> > Hadley > > ______________________________________________ > 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. >
I find them helpful for displaying the differences in coupled biomarkers between therapies with different therapeutic targets. You can quickly see/show which marker is affected quicker and then the other compensating in response and how they can be reversed depending on target. Having each measure on its own actual scale and not having to do something like percent change over time is very helpful (for many biomarkers it's hard to judge the clinical relavence of scaled values). I believe in looking at the data in numerous ways, to help myself from confusing or misleading myself--which is not my intent. --Matt Austin Statistician, Amgen Inc. -----Original Message----- From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org] On Behalf Of hadley wickham Sent: Friday, September 28, 2007 10:14 AM To: Frank E Harrell Jr Cc: R-help Subject: Re: [R] Graphics and LaTeX documents with the same font> Yes there is harm. But to make bold lines, easy to read titles is fine. > See the spar function in > http://biostat.mc.vanderbilt.edu/SgraphicsHints for a starter. Also see > the setps, ps.slide, and setpdf functions in the Hmisc package.I was interested to see that you have code for drawing scatterplots with multiple y-axes. As far as I know the only legitimate use for a double-axis plot is to confuse or mislead the reader (and this is not a very ethical use case). Perhaps you have a counter-example? Hadley ______________________________________________ R-help@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. [[alternative HTML version deleted]]
Frank E Harrell Jr
2007-Sep-28 22:22 UTC
[R] Graphics and LaTeX documents with the same font
hadley wickham wrote:>> Yes there is harm. But to make bold lines, easy to read titles is fine. >> See the spar function in >> http://biostat.mc.vanderbilt.edu/SgraphicsHints for a starter. Also see >> the setps, ps.slide, and setpdf functions in the Hmisc package. > > I was interested to see that you have code for drawing scatterplots > with multiple y-axes. As far as I know the only legitimate use for a > double-axis plot is to confuse or mislead the reader (and this is not > a very ethical use case). Perhaps you have a counter-example? > > Hadley >Generally I share your dislike of those, and prefer multiple panels with different scales. Cheers Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
On Fri, Sep 28, 2007 at 12:13:46PM -0500, hadley wickham wrote:> > Yes there is harm. But to make bold lines, easy to read titles is fine. > > See the spar function in > > http://biostat.mc.vanderbilt.edu/SgraphicsHints for a starter. Also see > > the setps, ps.slide, and setpdf functions in the Hmisc package. > > I was interested to see that you have code for drawing scatterplots > with multiple y-axes. As far as I know the only legitimate use for a > double-axis plot is to confuse or mislead the reader (and this is not > a very ethical use case). Perhaps you have a counter-example? > > HadleyIt can be useful to see multiple timeseries on the same x (time) scale but with different y scales for each to see if there are time-lag correlations between different quantities -- Daniel Lakeland dlakelan at street-artists.org http://www.street-artists.org/~dlakelan