Tha handy thinb about the fig=TRUE option in Sweave is that you do not
have to bother about filenames and starting and stpping the device.

I want the the resulting LaTeX to look as:

\begin{Schunk}
\begin{Sinput}
> x <- seq(-2 * pi, 2 * pi, 0.1)
> plot(x, cos(x), type = "l", lwd = 4)
\end{Sinput}
\end{Schunk}

\begin{figure}
\includegraphics[width=0.6\textwidth]{xx-001}
\end{figure}

i.e. with options to the \includegraphics and all embedded in a figure
environment.

1)
Is there a way to do this without writing the figure environment
manually?

2)
If not, is there a way to get the generated filename of the plot, or to
explicitly give it
in the .rnw file? The point of course being to avoid to start and stop
the graphics driver explicitly?

Best,
Bendix Carstensen
______________________________________________

Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2-4
DK-2820 Gentofte
Denmark
+45 44 43 87 38 (direct)
+45 30 75 87 38 (mobile)
[EMAIL PROTECTED]   http://www.biostat.ku.dk/~bxc

This e-mail (including any attachments) is intended for ...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to