在R中标记Y轴

时间:2013-02-05 15:27:46

标签: r

假设我需要将x和y的序列绘制为:

x <- seq(0, 10, by =0.001)
gx1 <- exp(-(x^2))
plot(x, gx1, type="l", lty=1, lwd=3,
xlab="x", ylab="G_b(x)",ylim=c(0,1))

但是我想在Y轴上添加$ \ bar {f} _k(x)$作为标签。有谁知道如何做到这一点?

1 个答案:

答案 0 :(得分:1)

尝试,

plot(x, gx1, type="l", lty=1, lwd=3, xlab="x", 
ylab=expression(bar(f)[b](x)),ylim=c(0,1))

我在

找到了解决方案

Getting LaTeX into R Plots

作者:Christopher DuBois

相关问题