我是R和LaTeX的新手,最近才发现如何使用R绘制标准时间序列图,并将其保存为png图像.我担心的是,将其保存为图像,然后将其嵌入latex 中,会使其zoom ,看起来很难看.
有没有办法让R的plot()
函数输出一个矢量图形并嵌入到LaTeX中?我在这两方面都是初学者,所以请温柔一点:)非常感谢代码片段!
我是R和LaTeX的新手,最近才发现如何使用R绘制标准时间序列图,并将其保存为png图像.我担心的是,将其保存为图像,然后将其嵌入latex 中,会使其zoom ,看起来很难看.
有没有办法让R的plot()
函数输出一个矢量图形并嵌入到LaTeX中?我在这两方面都是初学者,所以请温柔一点:)非常感谢代码片段!
谢恩是对的,你真的想要斯威夫.最后
作为一个新手,你最好把任务分开.为此,请执行以下操作:
pdf("figures/myfile.pdf", height=6, width=6)
.plot(1:10, type='l', main='boring')
——记住lattice和ggplot需要一个明确的print
,大约plot
.dev.off()
以完成文件.usepackage{graphicx}
in the document header, use\includegraphics[width=0.98\textwidth]{figures/myfile}
to include the figure created earlier and note that file extension is optional.pdflatex
个,尽情享受.