[R] sweave: graphics not at the expected location in the pdf

Don MacQueen macq at llnl.gov
Fri Jun 25 16:49:06 CEST 2004

This is actually a LaTeX question, not an R (or even Sweave, strictly 
speaking) question.

Here is what I have done. In the preamble, specify


Then later on specify [H] when including a figure, as in:

     \caption{My plot\label{fig1}}

Is the "here" package *required* in order to use [H]? I don't know. I 
just found it mentioned in a LaTeX book, tried it, and it worked. The 
most helpful book I've found so far is
      Guide to LaTeX (fourth edition), by Helmut Kopka and Patrick W. Daly

And yes, Sweave is great!


At 1:51 PM +0200 6/25/04, Christoph Lehmann wrote:
>I use sweave for excellent pdf output (thank you- Friedrich Leisch). I
>have just one problem. Quite often it happens, that the graphics are not
>at the place where I expect them, but (often on a separate page) later
>on in the pdf. How can I fix this, means how can I define, that I want a
>graphic exactly here and now in the document?
>Many thanks and best regards
>Christoph Lehmann <christoph.lehmann at gmx.ch>
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA

More information about the R-help mailing list