From 71ffd4fcbf273289a556ee5ed39a6b8edf8444a1 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 16 Nov 2019 14:27:52 +0100 Subject: Add mayavi to the examples --- src/python/example/plot_alpha_complex.py | 5 ++++- src/python/example/plot_rips_complex.py | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/python/example') diff --git a/src/python/example/plot_alpha_complex.py b/src/python/example/plot_alpha_complex.py index 98931975..99c18a7c 100755 --- a/src/python/example/plot_alpha_complex.py +++ b/src/python/example/plot_alpha_complex.py @@ -31,4 +31,7 @@ ax = fig.gca(projection='3d') ax.plot_trisurf(points[:,0], points[:,1], points[:,2], triangles=triangles) plt.show() -# Third possibility: mayavi.mlab.triangular_mesh +# Third possibility: mayavi +from mayavi import mlab +mlab.triangular_mesh(points[:,0], points[:,1], points[:,2], triangles); +mlab.show() diff --git a/src/python/example/plot_rips_complex.py b/src/python/example/plot_rips_complex.py index d2637ea8..1c878db1 100755 --- a/src/python/example/plot_rips_complex.py +++ b/src/python/example/plot_rips_complex.py @@ -31,4 +31,8 @@ ax = fig.gca(projection='3d') ax.plot_trisurf(points[:,0], points[:,1], points[:,2], triangles=triangles) plt.show() -# Third possibility: mayavi.mlab.triangular_mesh +# Third possibility: mayavi +# (this may take a while) +from mayavi import mlab +mlab.triangular_mesh(points[:,0], points[:,1], points[:,2], triangles); +mlab.show() -- cgit v1.2.3