In [ ]:
import numpy as np
from scipy import stats
from mayavi import mlab
import multiprocessing
import vtk

mlab.init_notebook(local=False, backend='png')

Test with the cell below.


In [ ]:
s = mlab.test_plot3d()
s

In [ ]:
from scipy.interpolate import griddata
import numpy as np

# Create some test data, 3D gaussian, 200 points
dx, pts = 2, 100j

N = 100
R = np.random.random((N,3))*2*dx - dx
V = np.exp(-( (R**2).sum(axis=1)) )

# Create the grid to interpolate on
X,Y,Z = np.mgrid[-dx:dx:pts, -dx:dx:pts, -dx:dx:pts]

# Interpolate the data
F = griddata(R, V, (X,Y,Z))

In [ ]:
c = mlab.contour3d(F,contours=8,opacity=.2 )
c

In [ ]: