[R] Lattice .ps graphic is rotated in LaTeX slides

Michael Friendly friendly at yorku.ca
Fri Oct 1 21:24:57 CEST 2004

That does indeed work!  I had read the arguments section of ?postscript, 
but this will teach me to read
the details.  There could/should be a trellis.device("eps", ...) that 
supplies the appropriate defaults.

For the perversely inclined I was able to use my original .ps file in 
this contorted way:



Marc Schwartz wrote:

>On Fri, 2004-10-01 at 10:09, Michael Friendly wrote:
>>I've generated a version of the classic dotplot of the barley data with
>>trellis.device("postscript", color=TRUE, file="barley2x3.ps")
>>old.settings <- trellis.par.get()
 .... snip ...

>Try the following when specifying the trellis.device:
>trellis.device("postscript", color = TRUE, file = "barley2x3.eps",
>                onefile = FALSE, paper = "special", horizontal = FALSE,
>                width = 9, height = 6)
>See if that works without specifying the angle in your LaTeX for
>  \begin{center}
>    \includegraphics[height=.6\textheight]{fig/barley2x3.eps}
>  \end{center}
>Note that when including graphics in LaTeX, you should use EPS files,
>which (as noted in ?postscript) require certain device settings to
>create. These include:
>onefile = FALSE, paper = "special", horizontal = FALSE
>and the device 'width' and 'height' settings.
>This will also adjust the size of the bounding box.
>Marc Schwartz

Michael Friendly     Email: friendly at yorku.ca 
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA

More information about the R-help mailing list