【发布时间】:2014-07-16 21:08:39
【问题描述】:
我一直在研究数学符号和不同的软件包,但还没有找到任何可以让我打印 xbar(平均 x)的东西。
我希望在 matplotlib 中使用 xbar 作为标签。
有什么建议吗?
谢谢。干杯
【问题讨论】:
标签: python text matplotlib notation
我一直在研究数学符号和不同的软件包,但还没有找到任何可以让我打印 xbar(平均 x)的东西。
我希望在 matplotlib 中使用 xbar 作为标签。
有什么建议吗?
谢谢。干杯
【问题讨论】:
标签: python text matplotlib notation
如果你想在 matplotlib 中使用 x bar 作为标签,你可以这样做:
plt.ylabel(r'$\bar{x}$')
【讨论】:
\overline{xyz} 用于多个字符,\mathregular{\bar{x}} 如果您希望它使用非数学字体,则它与其他文本看起来无缝。
如果您使用的是 jupyter,您只需对一个字母 (x) 执行此操作:
$\bar x$
#or for a string
$\overline {xyzabc}$
#note that one $ will give you an inline output and $$...$$ would start
#a new line after your output
【讨论】: