有没有自动将纯标签添加到子图中的方法?具体来说,我使用了
ax1 = fig.add_subplot(121)
ax2 = fig.add_subplot(122)
我希望在子图的右上方添加“A”和“B”以区分它们,目前我正在使用某种虚拟方法,类似于:
ax1.annotate('A', xy=(2, 1), xytext=(1, 22))
ax2.annotate('B', xy=(2, 1), xytext=(1, 22))
我尝试使用
ax1.legend()
这也给我带来了字母前的“小图像”,通常是线条或点,但我不需要这个图像。