我想在使用matplotlib制作的图表坐标轴标签中写入latex数学模式符号$\bar{T}$。文档中说明不支持数学模式,因此我尝试了
plt.xlabel(r'$\displaystyle \={T}$',fontsize=12)
和
plt.xlabel(r'$\={T}$',fontsize=12)
这会给出错误信息
matplotlib.pyparsing.ParseFatalException: Expected end of math '$'
$\displaystyle \={T}$ (at char 0), (line:1, col:1)
和
raise ParseFatalException(msg + "\n" + s)
matplotlib.pyparsing.ParseFatalException: Expected end of math '$'
$\={T}$ (at char 0), (line:1, col:1)
>>>
有没有办法在使用matplotlib时在轴标签中写入此符号?我已经能够编写其他latex轴标签,但我从未使用过任何这些特殊字符。
\overline
。 - andrerud