Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了控制图形的大小,knitr我使用以下代码
knitr
\begin{figure}[H] \centering << label = Plot1, fig.width=5, fig.height=5, out.width=.7\linewidth, fig.keep = all>>= ... @ \caption{Plot} \label{fig:figPlot1} \end{figure}
我想知道如何为全局图定义这些控制参数,而不是定义每个图。感谢您的帮助和时间。
怎么样
\SweaveOpts{fig.width=5, fig.height=5, out.width=".7\\linewidth", fig.keep = "all"}
? 我已经修改了这些以与 knitr 版本 0.3 一起使用,这要求选项值采用有效的 R 语法......