仅在 3-d 图中关闭 z 轴 [英] Turn off z-axis only in 3-d plot

查看:34
本文介绍了仅在 3-d 图中关闭 z 轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些从不同角度查看的 mpl_toolkits.mplot3d 曲面图.从正上方(elev = 90,azim = 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([])

这篇关于仅在 3-d 图中关闭 z 轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆