I'm having an issue with TeXlipse where I'm generating a plot in Eclipse via Sweave, and the TeX file seems to be jamming all of my PDF plots in the left most corner of the page. This is driving me crazy. I'm not sure what SweaveOpts might fix this, but \oddsidemargin
, \evensidemargin
, \begin{centering}
, and \SweaveOpts{width=x, height=y}
does not help. My code is below:
Sweave Code:
\documentclass{article}
\usepackage{Sweave}
\usepackage{graphicx}
\SweaveOpts{prefix.string=C:/SweavePlots/bar}
\DeclareGraphicsExtensions{.pdf}
...
\begin{figure}
\begin{center}
<<figname, fig=TRUE, include=TRUE, echo=FALSE>>=
plot(1:10)
@
\caption{I hope this Works}
\end{center}
\end{figure}
TeX Code:
\begin{figure}
\begin{center}
\includegraphics{C:/SweavePlots/bar-figname}
\caption{I hope this Works}
\end{center}
\end{figure}
Resultant Figure: