title: MATLAB - 3D Contour Plot (Hydrogen 2p Orbitals)
body: <p>I've got the following code which works for plotting an x-y slice of the Hydrogen 2pz orbital:</p>
  
  <pre><code>%probability densities
  pd_psi_210 = @(r,theta,phi) exp(-r).*(r.^2).*(cos(theta).^2)/(32*pi);
  
  %configuring the range
  [x y z] = meshgrid(-10:.1:10,-10:.1:10,-2:.1:2);
  [THETA,PHI,R] = cart2sph(x,y,z);
  
  %create array of probability density magnitudes
  psi_210_vals = pd_psi_210(R,THETA,PHI);
  
  %plotting
  imagesc(psi_210_vals(:,:,1)); %x-y plane
  </code></pre>
  
  <p>I'd like to plot the 3d contour plot of the orbital. I've tried this (and it doesn't seem to get me what I wanted):</p>
  
  <pre><code>isosurface(psi_210_vals(:,:,:)); %3D contour
  </code></pre>
  
  <p>How can I get this to work?</p>