'Generates a 3-dimensional plot of the data set and principle components
using mayavi.
ix, iy, and iz specify which of the input p-dimensions to place on each of
the x,y,z axes, respectively (0-indexed).'

def plot3d(self, ix=0, iy=1, iz=2, clf=True):

    import enthought.mayavi.mlab as M
    if clf:
        M.clf()
    z3 = np.zeros(3)
    v = (self.getEigenvectors() * self.getEigenvalues())
    M.quiver3d(z3, z3, z3, v[ix], v[iy], v[iz], scale_factor=5)
    M.points3d(self.N[:, ix], self.N[:, iy], self.N[:, iz], scale_factor=0.3)
    if self.names:
        M.axes(xlabel=(self.names[ix] + '/sigma'), ylabel=(self.names[iy] + '/sigma'), zlabel=(self.names[iz] + '/sigma'))
    else:
        M.axes()
