title: Mayavi : surface plot and 3D contours
body: <p>Good evening everyone, I am a long time user of Matplotlib and I recently discovered Mayavi.</p>
  
  <p>With Matplotlib, I can plot a 3D surface with projected contours of the surface plot for each axis and I was wondering if the same could be done with Mayavi.</p>
  
  <p>Here is an example of what I have done so far with Matplotlib (<a href="https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html" rel="nofollow noreferrer">source</a>), but I have not been able to find a similar way to plot contours with Mayavi on the internet:</p>
  
  <p><a href="https://i.stack.imgur.com/IviNX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IviNX.png" alt="enter image description here"></a></p>
  
  <p><strong>Can someone who knows Mayavi tell me if I can plot 3D contours for each axis like with Matplotlib?</strong></p>
  
  <hr>
  
  <h2>Matplotlib code</h2>
  
  <pre><code>from mpl_toolkits.mplot3d import axes3d
  import matplotlib.pyplot as plt
  from matplotlib import cm
  
  fig = plt.figure()
  ax = fig.gca(projection='3d')
  X, Y, Z = axes3d.get_test_data(0.05)
  ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
  cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
  cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
  cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
  
  ax.set_xlabel('X')
  ax.set_xlim(-40, 40)
  ax.set_ylabel('Y')
  ax.set_ylim(-40, 40)
  ax.set_zlabel('Z')
  ax.set_zlim(-100, 100)
  
  plt.show()
  </code></pre>
  
  <h2>Mayavi code</h2>
  
  <pre><code>from mpl_toolkits.mplot3d import axes3d
  from mayavi import mlab
  
  X, Y, Z = axes3d.get_test_data(0.05)
  
  Z = np.rollaxis(Z,0,2)
  X = np.rollaxis(X,0,2)
  Y = np.rollaxis(Y,0,2)
  
  mlab.surf(X, Y, Z, warp_scale="auto", opacity=1)
  mlab.axes(xlabel='X', ylabel='Y', zlabel='Z')
  mlab.show()
  </code></pre>