【问题标题】:Text when rotated are not at correct (aligned) positions in matplotlib旋转时的文本在 matplotlib 中的位置不正确(对齐)
【发布时间】:2020-09-05 07:47:25
【问题描述】:

我想在我的情节中旋转一个文本。示例代码如下所示:

plt.text(0.5, 0.0, 'ABC', fontsize=40, rotation=90)
plt.text(0.5, 0.5, 'DFG', fontsize=40, rotation=90)

但是上述文本没有正确对齐。我附上了一张图来说明这一点

【问题讨论】:

    标签: python python-3.x matplotlib plot text


    【解决方案1】:

    这是 matplotlib https://github.com/matplotlib/matplotlib/issues/14239 中已确认的错误

    这里 bbox 位于正确的位置,但文本未呈现在相对于 bbox 的正确位置

    【讨论】:

      猜你喜欢
      • 2017-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-11
      • 2015-04-01
      • 2013-06-11
      相关资源
      最近更新 更多