Closed zhang-qiang-github closed 11 months ago
In addition, when I set the color map to rainbow
, the colorbar is weird.
mesh = Mesh('flow.vtu').add_scalarbar('pressure').cmap('rainbow')
show(mesh)
The result is:
The colorbar is not continuous. Why?
that's because you added the scalar bar before the cmap
call (so you are actually building the scalarbar for some other vector data), try instead:
from vedo import *
tmsh = TetMesh("flow.vtu")
msh = tmsh.tomesh(fill=False)
msh.cmap("rainbow", "Pressure").add_scalarbar()
show(msh, axes=1)
you can invert any colormap name by adding _r
, e.g. "rainbow_r"
I have a
vtu
file, andvedo
show it as:In this figure, the red color indicate lower value than blue color, which is non-instinctive. Is it possible to make red color indicate the higher value?
The test data is:
flow.zip