【发布时间】:2013-03-06 23:33:46
【问题描述】:
在 R 中,我使用 expression(theta[l]),以便绘图轴的标签与 LaTeX 中的 $\theta_l$ 相同。出于美观的原因,我宁愿显示$\theta_\ell$。你能帮帮我吗?
编辑
以前是这样的
plot(1:10, 1:10, xlab=expression(theta[l]))
然后我将生成的图片导出为 pdf。然后,使用
\begin{figure}[htbp]
\centerline{\includegraphics[scale=.6]{test.pdf}}
\end{figure}
我的图片被插入到 LaTeX 中。
在 cmets 之后,这是我现在要做的:
require(tikzDevice)
tikz("test.tex", standAlone=TRUE, width=5, height=5)
plot(1:10, 1:10, xlab="$\\theta_\\ell$")
dev.off()
tools::texi2pdf('test.tex')
system(paste(getOption('pdfviewer'),'test.pdf'))
但是,当我在 LaTeX 中插入结果图时,图形的质量不如以前。还有什么我可以做的吗?
【问题讨论】:
-
@agstudy:Windows。 Linux 也适合我。
-
@Sven Hohenstein:谢谢你的照片 :-)
-
this 是您要找的吗?
-
@plannapus:嗯,有趣!我会调查那个包:-)
-
这适用于
cairo_pdf:plot(1:10, main = "\u2113")。编辑:我刚刚意识到你想要 theta_ell,那可能对那里没有帮助......
标签: r plot latex axis-labels plotmath