mesh_sharemap.py 553 B

12345678910111213141516
  1. """Share the same color map
  2. across different meshes"""
  3. from vedo import Mesh, show, dataurl
  4. #####################################
  5. man1 = Mesh(dataurl+"man.vtk")
  6. scals = man1.vertices[:, 2] * 5 + 27 # pick z coordinates [18->34]
  7. man1.cmap("rainbow", scals, vmin=18, vmax=44)
  8. #####################################
  9. man2 = Mesh(dataurl+"man.vtk")
  10. scals = man2.vertices[:, 2] * 5 + 37 # pick z coordinates [28->44]
  11. man2.cmap("rainbow", scals, vmin=18, vmax=44).add_scalarbar()
  12. show([(man2, __doc__), man1], shape=(2,1), elevation=-40, axes=11).close()