All,

Here is my first attempt to draw a surface and a plane on the same axes using mplot3d.

from mpl_toolkits.mplot3d import Axes3D

from matplotlib import cm

import matplotlib.pyplot as plt

import numpy as np

fig=plt.figure()

ax = Axes3D(fig)

x=np.linspace(-2,2,40)

y=x

x, y = np.meshgrid(x,y)

z=9-x**2-y**2

ax.plot_surface(x,y,z,rstride=5,cstride=5)

xp=np.linspace(-2,2,40)

zp=np.linspace(0,9,40)

xp, zp=np.meshgrid(xp,zp)

yp=np.ones(xp.shape)

ax.plot_surface(xp,yp,zp)

plt.show()

The difficulty comes when I rotate the axes with the mouse. You cannot tell where the correct position of the plane is as you can when rotating a similar figure in Matlab. Is this a bug or a feature yet to be added? Is there a workaround I am not aware of at this early stage?

David Arnold

College of the Redwoods

Department of Mathematics