[R] EPS->LaTeX problem

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jan 27 18:46:03 CET 2002


On Sun, 27 Jan 2002, Deepayan Sarkar wrote:

> I'm not entirely sure what the problem is, but either of these
> (but not both) might help:
>
> 1. \includegraphics[angle=-90]{crime.eps}
> 2. postscript(file = "crime.eps", horizontal = FALSE)

Or see the advice in ?postscript for how to make eps files.

BTW,

\includegraphics[width=\textwidth]{crime.eps}

is preferred, both as the way to do this, and because you shouldn't be
changing the aspect ratio after producing the plot: any text shows
up as distorted if you do.

>
>
> --- Andrew Perrin <andrew_perrin at unc.edu> 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.
> >
> > ap
> >
> > ----------------------------------------------------------------------
> > Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
> >  Assistant Professor of Sociology, U of North Carolina, Chapel Hill
> >       269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
> >
> >
> >
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > 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
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
> __________________________________________________
>
> Great stuff seeking new owners in Yahoo! Auctions!
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

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