Closed cameronbracken closed 13 years ago
One feature I believe that Sweave should have from the very beginning is to have a way to specify the width/height of the graphics device (such as pdf()
or postscript()
) and the size of the figure in LaTeX respectively. Unfortunately Sweave invented the LaTeX command \setkeys{Gin}{}
instead. This is a solution, but not neat in my eyes. One thing I like the tikz device is I can use [nogin] with Sweave, and the width/height options will lead to the real size of the figure, which will not bring any confusion.
I am not sure if the issue comes from the width/height specification, but personally I would prefer different options to control the size of the graphics device and the size of LaTeX figures independently in the chunk options. Perhaps dev.width
and dev.height
?
I completely agree. Using Gin
(and actually having Sweave.sty exist at all) was a mistake in my opinion. nogin
is the way to go for pgfSweave.
I see two problems with new options:
\input{}
command to include the graphic and no way to set the dimensions. pdf()
(I also wish one day there could be a png() device -- we talked with them for a couple of times but it seems impossible to have the support from the official R; sorry, this is off-topic).Here is one way to solve this using the new tikz externalization library:
can also be used to generate bitmap graphics. This will be the suggested way in the next version of pgfSweave.
setting tex.driver=latex will correctly create an eps figure but in the document it will be very large. Too large for anyone to want.