更新时间:1970-01-01 07:59:06
Shane 恰到好处,您确实需要 Sweave.最终.
Shane is spot-on, you do want Sweave. Eventually.
作为新手,您***将任务分开.为此,请执行以下操作:
As a newbie, you may better off separating task though. For that, do this:
pdf("figures/myfile.pdf", height=6, width=6)
.plot(1:10, type='l', main='boring')
-- 请记住,lattice 和 ggplot 需要显式 print
code> 围绕 plot
.dev.off()
以完成文件.usepackage{graphicx}
,使用includegraphics[width=0.98 extwidth]{figures/myfile}
包含之前创建的图形并注意文件扩展名是可选的.pdflatex
运行它并享受.pdf("figures/myfile.pdf", height=6, width=6)
.plot(1:10, type='l', main='boring')
-- and remember that lattice and ggplot need an explicit print
around plot
.dev.off()
to finalize the file.usepackage{graphicx}
in the document header, useincludegraphics[width=0.98 extwidth]{figures/myfile}
to include the figure created earlier and note that file extension is optional.pdflatex
and enjoy.