[R] embedFonts rotates figure

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 8 23:05:39 CEST 2007


On Mon, 8 Oct 2007, Peter Dalgaard wrote:

> Paul Smith wrote:
>> Dear All,
>>
>> Consider the following code:
>>
>> pdf(file="figure.pdf",family="URWPalladio")
>>
>> curve(dlnorm(x,0,1.5),0,10,xlim=c(0,10),ylim=c(0,0.85),axes=F,xlab="",ylab="f")
>> segments(exp(-1.5^2),0,exp(-1.5^2),dlnorm(exp(-1.5^2),0,1.5),lty="dashed")
>> segments(1,0,1,dlnorm(1,0,1.5),lty="dashed")
>> segments(exp(1.5^2),0,exp(1.5^2),dlnorm(exp(1.5^2),0,1.5),lty="dashed")
>> axis(2)
>> axis(1,at=c(exp(-1.5^2),1,exp(1.5^2)),labels=c(expression(mu[0]),expression(mu[e]),expression(mu)))
>> box()
>>
>> dev.off()
>>
>> and now:
>>
>> embedFonts("figure.pdf")
>>
>> The figure.pdf gets rotated. Any ideas about how to prevent the
>> rotation? I am using R 2.5.1 on F7 (Linux).
>>
>>
> embedFonts("figure.pdf", options="-dAutoRotatePages=/None")
>
> Or stick the same thing into the environment variable GS_OPTIONS and
> begone with the autorotation misfeature for good. (As far as I remember,
> this is neither the fault of R nor Ghostscript.)

It comes from recentish versions of Ghostscript following Adobe. See

https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027766.html
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/26598.html

-- 
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



More information about the R-help mailing list