import matplotlib.pyplot as plt
x=[1,2,3]
y=[1,2,3]
fig, ax = plt.subplots()
# 取消边框
for key, spine in ax.spines.items():
# 'left', 'right', 'bottom', 'top'
if key == 'right' or key == 'top':
spine.set_visible(False)
plt.plot(x,y)
plt.show()
matplotlib取消边框
最新推荐文章于 2024-03-09 16:38:48 发布