我发现TeX弄乱了我的字体,子图yaxis标签的对齐方式等,我觉得必须有一种更简单的方法来获取图例标签中的子脚本和上标。救命!
只需\mathregular{whatever}在您的表情中使用即可。
例如:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.text(0.2, 0.7, 'No mathtex')
ax.text(0.2, 0.5, 'This superscript $is^{in}$ italics')
ax.text(0.2, 0.3, 'While this $\mathregular{is^{really}}$ the same font')
plt.show()
Run Code Online (Sandbox Code Playgroud)

有关更多信息,请参见http://matplotlib.org/users/mathtext.html。
| 归档时间: |
|
| 查看次数: |
5443 次 |
| 最近记录: |