fig = plt.figure(figsize=(12,8)) ax = fig.gca(projection='3d') x=0 y=0 z=0 n=0 f=open("neurons.obj","w") #basket(ax,x,y,z,color='k',objfile=f) pyramidal(ax,x,y,z,dz=3,color='k',objfile=f) for i in xrange(4*n): x=np.random.rand()*10 y=np.random.rand()*10 z=np.random.rand()*1 pyramidal(ax,x,y,z,color='k',objfile=f) f.close() plt.show()