title: Scatter plot for cube
body: <p>I am looking for a way to visualise a cube using a scatter plot.</p>
  
  <p>for example it is possible to do for a cylinder thus:</p>
  
  <pre><code>[X,Y,Z]=cylinder(20) 
  x=X(:)
  y=Y(:)
  z=Z(:)
  scatter3(x,y,z)
  </code></pre>
  
  <p>I'm unable to find something similar for cubes. </p>
  
  <p>I hope to then 'fill' this cube by:</p>
  
  <pre><code>x=[0.5X(:);X(:)] 
  </code></pre>
  
  <p>and so on.</p>
  
  <p><a href="http://www.mathworks.com/matlabcentral/newsreader/view_thread/235581" rel="nofollow">http://www.mathworks.com/matlabcentral/newsreader/view_thread/235581</a></p>
  
  <p>I've looked at the above, however none of them will work for me I think. I need to also have a colour value attached to each data point to be plotted. </p>