python - matplotlib 中的中心线断轴标签

标签 python latex matplotlib

知道为什么 ylabel 不是居中对齐的吗?我该如何将它居中?

ylabel not centered in plot 使用 LaTeX 渲染文本 (text.usetex: True)

ylabel('土壤水分敏感性,\n(0.01 K m$^3$ m$^{-3}$)')

尝试添加\centering,没有用。

最佳答案

你试过吗

ylabel('土壤水分敏感性,\n(0.01 K m$^3$ m$^{-3}$)', multialignment='center')?

如下所示:http://matplotlib.sourceforge.net/examples/pylab_examples/multiline.html

关于python - matplotlib 中的中心线断轴标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10144962/

相关文章:

python - 使类在继承方面可迭代

graph - 如何在 latex 上绘制加权图?

python - 使用 matplotlib 创建词云

r - 无法在子 .Rmd 中编译带有图像的 RMarkdown pdf - LaTeX 错误 - 找不到图像文件

python - 如何使用 JupyterLab 循环更新交互式图形

python - 颜色条和多个子图的问题

python 如何观察wmi中Win32_Processor LoadPercentage的变化?

python - python scapy portscanner 的问题

python - 默认解释器总是重置

r - Knitr 在 R 代码中转义 latex 特殊字符(例如,〜,$)