目前,我用matplotlib绘制的图如图1所示,正如您在x轴上看到的,我的箭头的一半被该轴覆盖
我希望整个箭头如图2所示
这是我代码的相关部分,X_fine和Y_fine的范围与X和Y相同,但有更多的垃圾箱
X, Y = np.meshgrid(arrow_csf_centre, arrow_precip_centre)
X_fine, Y_fine = np.meshgrid(arrow_csf_centre_fine, arrow_precip_centre_fine)
plt.contourf(X_fine, Y_fine, np.transpose(counts2_fine), 30)
plt.quiver(X,
Y,
np.transpose(arrow_dirs[:,:,0]),
np.transpose(arrow_dirs[:,:,1]),
angles='xy',
scale_units='xy',
scale=1,
pivot='mid')
谢谢你的阅读
您可以在
plt.quiver
中添加:clip_on=False
这应该可以做到
相关的: How do I let my matplotlib plot go beyond the axes?
相关问题 更多 >
编程相关推荐