3

I want to plot a surface without axes planes.. I think I'll explain better with images:

I want to get whis one:

desirerd

Instead, I'm getting this:

current

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
nkint
  • 11,513
  • 31
  • 103
  • 174

3 Answers3

6

This one disables all the axes stuff:

ax.grid(False)
for a in (ax.w_xaxis, ax.w_yaxis, ax.w_zaxis):
    for t in a.get_ticklines()+a.get_ticklabels():
        t.set_visible(False)
    a.line.set_visible(False)
    a.pane.set_visible(False)
David
  • 106
  • 1
  • 1
3

After much beating of head against wall, I was able to come up with this:

ax.grid(False)
ax.w_xaxis._AXINFO['y']['color'] = (0.9, 0.9, 0.9, 0.0)
ax.w_xaxis._AXINFO['x']['color'] = (0.9, 0.9, 0.9, 0.0)
ax.w_xaxis._AXINFO['z']['color'] = (0.9, 0.9, 0.9, 0.0)

Next, i bet you'll want the ticks, ticklabels, etc, turned off. I can't do it!

One would think that ax.axis("off"), ax.xaxis.visible(False), ax.xaxis.set_alpha(0.0) would do something noticeable.

I'm using version 1.0.1 and I'm suspecting there are still a lot of bugs in the axis3d object. It's seen a lot of changes lately.

enter image description here

Paul
  • 42,322
  • 15
  • 106
  • 123
  • I also tried some of the obvious stuff like `ax.axis("off")` but with no luck. Kudos for digging that deep into the API to find that, but I agree that the 3D lib is definitely lacking – JoshAdel Feb 28 '11 at 02:45
2

What you want is the grid keyword (if I understood the question correctly):

fig=figure()
ax = fig.add_subplot(111,projection="3d")
ax.plot(X,Y,Z)
ax.grid(on=False)
show()

It would help to see how you are setting up your plot, but at least for me messing around in pylab, ax.grid(on=False) did the trick. This turns off the grid projected onto the sides of the cube. See the mplot3d API for more details:

http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html

JoshAdel
  • 66,734
  • 27
  • 141
  • 140
  • it's not only the grid.. i mean also the gray plane that makes the bound-cube.. i'd like to render only the surface, like to render them in opengl – nkint Feb 27 '11 at 22:31
  • @nkint - Have you looked through the API yourself? I took a quick look and could not find a method that seemed to remove the gray axes planes. It would help if you (1) specified exactly what you were trying to accomplish and (2) what you've tried on your own. Additionally if you did a search of past questions, you'll find a similar question that has gone unanswered: http://stackoverflow.com/questions/3732787/how-can-i-remove-the-axes-in-an-axes3d-class – JoshAdel Feb 28 '11 at 00:40