如果我有一个带有子图的matplotlib图,是否可能有多个suptitle
?(Kind of like the loc='center', loc='left', and loc='right' arguments for a regular title)
在下面的示例中,suptitle
的多个实例被覆盖,并且只有最后一个suptitle显示在图上
import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(1,2)
plt.suptitle('center title')
plt.suptitle('right title', x=.8)
plt.suptitle('left title', x=.2)
我想到的最好的解决方案是在绘图中添加文本,并根据带有参数
transform=fig.transFigure
的图形坐标调整位置相关问题 更多 >
编程相关推荐