This works:
ax = fig[:add_subplot](2,1,1, projection = "3d")
xgrid = repmat(x',n,1)
ygrid = repmat(y,1,n)
ax[:plot_surface](xgrid, ygrid, z, rstride=2,edgecolors="k", cstride=2, cmap=ColorMap("gray"), alpha=0.8, linewidth=0.25)
xlabel("X")
ylabel("Y")
subplot(212)
ax = fig[:add_subplot](2,1,2)
cp = ax[:contour](xgrid, ygrid, z, colors="black", linewidth=2.0)
ax[:clabel](cp, inline=1, fontsize=10)
xlabel("X")
ylabel("Y")
My greatest source of good examples is always:
http://matplotlib.org/gallery.html, and there is a good gist that shows how to use PyPlot in julia:
https://gist.github.com/gizmaa/7214002