[R] SUMMARY: EPS->LaTeX problem

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jan 27 21:43:20 CET 2002


On Sun, 27 Jan 2002, Andrew Perrin wrote:

> Earlier today I posted a problem importing an R graph into a LaTeX file of
> seminar class: specifically, the graphic was showing up rotated 180
> degrees, along with the rest of the page it was on.
>
> In a real victory for open-source software, I got lots of responses with
> three distinct approaches, each of which appears to solve the problem. Try
> getting fast, correct help from Microsoft on a Sunday morning!
>
> Here's the summary:
>
> 1.) From Brian Flaherty on the Debian list:
> Rather than what you have above, what about something along the lines
> of this:
>
> \includegraphics[scale=.5,angle=180,keepaspectratio=T]{crime.eps}
>
> and chose the scale that you wish.
>
> (I actually ended up using:
> \includegraphics[scale=.37,angle=270,keepaspectratio=T]{crime.eps}
> ), which works fine

As several people suggested, including me, setting width= or height= is
better. And keepaspectratio=T is the default unless you set both.

> 2.) From numerous helpers on the R-Help list:
> use the horizontal=FALSE argument to the postscript() command in R:
>
> postscript(..., horzontal = FALSE)
>
>
> 3.)  You could try dev.copy2eps:
>
>      `dev.copy2eps' is similar to `dev.print' but produces an EPSF
>      output file, in portrait orientation (`horizontal = FALSE')
>
> I think you can just use this command, and follow it with
> dev.off().  Then I recall you have to rename the resulting output
> to crime.eps.

Neither.  You don't need dev.off, but you do need to specify the file name
to dev.copy2eps.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list