Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off z-axis only in 3-d plot

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() hides all of the axes, but I want to hide or turn off the z-axis but still see the x and y axes.

How can I do it?

like image 952
user1666203 Avatar asked Sep 12 '12 15:09

user1666203


1 Answers

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([])
like image 180
TheIdealis Avatar answered Oct 29 '22 00:10

TheIdealis