您好,我使用Python和模块Matplotlib编写了以下代码:
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
f = plt.figure()
gs0 = gridspec.GridSpec(1, 1, figure=f)
gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0])
ax1 = f.add_subplot(gs00[:, :-1])
ax2 = f.add_subplot(gs00[:-1, -1])
ax3 = f.add_subplot(gs00[-1, -1])
ax1.axis('off')
ax2.axis('off')
ax3.axis('off')
ax1.text(0.5, 0.5, "ax1", va="center", ha="center")
ax2.text(0.5, 0.5, "ax2", va="center", ha="center")
ax3.text(0.5, 0.5, "ax3", va="center", ha="center")
f.add_artist(plt.Rectangle((0.01, 0.01), 0.99, 0.99,
edgecolor = 'black', facecolor = 'orange',
fill = False, angle=40,
linewidth = 3, zorder = 1))
plt.show()
但是我想在我的矩形中使用类似的东西boxstyle='round,pad=1'
因为我有:
我想要这个:
非常感谢你的帮助
目前没有回答
相关问题 更多 >
编程相关推荐