Skip to content

Sweave - landscape figure

7 messages · Duncan Mackay, Duncan Murdoch, Eduardo M. A. M. Mendes

#
Hi Eduardo

in the preamble put

\usepackage[figureright]{rotating}

see manual for figureright if you do not like it

and then some graphics with options where needed

\begin{sidewaysfigure}
\centering
\includegraphics[width=,%
                  clip=true,%
                  trim=0in 0in 0in 0in,% LBRT
                  keepaspectratio=true]%
                  {filename}
\end{sidewaysfigure}

otherwise \usepackage landscape (check spelling) for a full page

HTH

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
Email: home mackay at northnet.com.au
At 05:58 05/08/2011, you wrote:
, pdflatex
#
On 05/08/2011 10:23 AM, Eduardo Mendes wrote:
You did something you aren't telling us. (Since you aren't showing us 
what you did, that's pretty much certain.)
It doesn't if you do it right. (I did it wrong: I used Latex style 7in 
instead of Sweave style 7.)

Duncan Murdoch
#
Hi there

This is what I did:


<<Myfig1, fig=TRUE, include=FALSE>>=
print(xyplot(data.flow,xlab="Time",ylab="Flow"))
@

\begin{figure}
\includegraphics[angle=90,width=0.8\textheight]{Myfig1}
\caption{First Data}
\end{figure}

and here is the latex error.

! LaTeX Error: File `Myfig1' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.92 ...ics[angle=90,width=0.8\textheight]{Myfig1}


There is the pdf file - example_flow-Myfig1.pdf but not Myfig1 as in the above command.

As for the second part, you were right about leaving out "in".  However what changes is not the "canvas size" but each figure within the plot (There are 14 subfigures). Again the canvas size in the first solution is smaller than in the third solution.

Many thanks for your help and patience.

Cheers

Ed
On Aug 5, 2011, at 11:54 AM, Duncan Murdoch wrote:

            
#
Hi Eduado

It you may get some info for multiple graphs in latex with

Keith Reckdahl 2006 Using Imported Graphics in LATEX and pdfLATEX
there may be some later version

Duncan
At 03:16 06/08/2011, you wrote:
, pdflatex the output is a