[R] EPS->LaTeX problem

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun Jan 27 18:17:46 CET 2002



Andrew Perrin wrote:
> 
> Greetings-
> 
> I have a strange problem displaying a graph from R (1.3.1, linux) in a
> LaTeX document of documentclass seminar.
> 
> I'm using graphicx to include the file:
> 
> \usepackage{graphicx}
> 
> ...
> 
> \resizebox{\textwidth}{\textheight}{\includegraphics{crime.eps}}
> 
> When I do this, the entire slide (including the page number) is rotated
> 180 degrees. Any ideas why this happens?
> 
> The graph was created using the syntax in R:
> 
> data(USArrests)
> postscript(file="crime.eps")
> plot(USArrests$Murder, USArrests$Assault)
> abline(lm(USArrests$Assault ~ USArrests$Murder))
> dev.off()
> 
> Thanks for any advice. This is rather urgent, as I'm trying to use it for
> a lecture in my class Monday morning.

Two solutions (not tested):

1 - Use  postscript(..., horzontal = FALSE)  
    (maybe you have to adjust width and height)
    for details see ?postscript

2 - generate a bounding box, so the page will still be horizontal.

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