very convenient to explore VTK files inside jupyter.
The example gallery is great but I cannot find a simple example of a direct show of a vtu file while picking the right scalar field to be presented on the mesh.
Any hints ?
Hi try for ex:
from vtkplotter import *
mesh = load(datadir+'pulley.vtu')
mesh.addPointScalars(mesh.coordinates()[:,0], 'my_x')
mesh.addPointScalars(mesh.coordinates()[:,1], 'my_y')
mesh.addPointScalars(mesh.coordinates()[:,2], 'my_z')
mesh.scalars('my_y') # or mesh.scalars(2)
printInfo(mesh)
show(mesh)
Inside jupyter:

(the actual printout format will be a bit different)
Thanks a lot for your help. printInfo does help a lot.