如何在matplotlib中更改轴重量(使轴更大胆)?
from pylab import *
x = [5,7,5,9,11,14]
y = [4,5,3,11,15,14]
scatter(x, y, s=50, color='green',marker='h')
show()
答案 0 :(得分:5)
您可以在Matplotlib中设置称为脊椎(轴的一侧)的最小宽度:
fig, ax = plt.subplots()
ax.plot(np.random.randn(100).cumsum())
# The spines
plt.setp(ax.spines.values(), linewidth=3)
# The ticks
ax.xaxis.set_tick_params(width=3)
ax.yaxis.set_tick_params(width=3)
答案 1 :(得分:0)