仅在3D图中关闭Z轴 [英] Turn off z-axis only in 3-d plot
本文介绍了仅在3D图中关闭Z轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些 mpl_toolkits.mplot3d
表面图,可以从不同角度查看。从正上方看(高度= 90,方位角= 90)时,z轴的文本全部堆积在其顶部。
I have some mpl_toolkits.mplot3d
surface plots that I am viewing from different angles. When viewed from directly above (elev = 90, azim = 90) the text of the z-axis is all piled up on top of itself.
ax.set_axis_off()
隐藏所有轴,但是我想隐藏或关闭z-轴,但仍然可以看到x和y轴。
ax.set_axis_off()
hides all of the axes, but I want to hide or turn off the z-axis but still see the x and y axes.
我该怎么做?
推荐答案
大多数功能可通过w_zaxis访问:
Most of the features are accessible via w_zaxis:
在这种情况下,您可以使用:
In this case you can use:
ax.w_zaxis.line.set_lw(0.)
ax.set_zticks([])
这篇关于仅在3D图中关闭Z轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文