fig, ax = plt.subplots()
ax.一系列绘图操作()
plt.axis("off")
# 去除图像周围的白边
plt.gca().xaxis.set_major_locator(plt.NullLocator())
plt.gca().yaxis.set_major_locator(plt.NullLocator())
plt.subplots_adjust(top=0, bottom=0, left=0, right=0, hspace=0, wspace=0)
【Matplotlib】去除绘制图像的白色边框
最新推荐文章于 2024-12-24 21:11:09 发布