Python 绘图角的注释忽略';α';论点

Python 绘图角的注释忽略';α';论点,python,matplotlib,Python,Matplotlib,我正在并排绘制子地块,并希望将它们分别指定为“a”和“b”。我想右上角是个不错的位置 当我使用matplotlib的注释时,类似于: props = dict(boxstyle="round", fc='white',alpha = 1) ax.annotate("b", (1, 1), xycoords = 'axes fraction', verticalalignment = "center", horizontalalignme

我正在并排绘制子地块,并希望将它们分别指定为“a”和“b”。我想右上角是个不错的位置

当我使用matplotlib的
注释时,类似于:

props = dict(boxstyle="round", fc='white',alpha = 1)
ax.annotate("b", (1, 1), xycoords = 'axes fraction', verticalalignment = "center", horizontalalignment='center', size=14, bbox = props)
它正确放置文本框,但文本框是透明的:

如果我尝试使用matplotlib的
文本
而不是
注释
,也会发生同样的情况。你知道发生了什么吗?

我在这里发现()在将文本添加到图形之前,应该先弹出文本。下面的snipet解决了这个问题

props = dict(boxstyle="round", fc='white',alpha = 1)
ax.annotate("b", xy=(1, 1), textcoords='axes fraction', verticalalignment = "center", horizontalalignment='center', size=14, bbox = props)
fig.texts.append(ax.texts.pop())

没有,但多亏了你的评论,我终于回答了这个问题:有人在哪里发布了解决方案。人们必须先弹出文本,然后才能实际绘制图形。