ax绘图相关的知识点

1、去边框

# 去掉上、下、左、右边框
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['right'].set_visible(False)

2、去掉x、y坐标轴刻度

ax.set_xticks([])
ax.set_yticks([])

3、设置标题、x和y轴标题

ax.set_title("支持向量类标")
ax.set_xlabel("length")
ax.set_ylabel("width")

4、设置x、y轴表示范围

ax.set_xlim(0,35)
ax.set_ylim(0,35)

猜你喜欢

转载自www.cnblogs.com/komean/p/11106927.html