-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make cmap(on="") work out its default cell or point data
- Loading branch information
Showing
22 changed files
with
127 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
"""Load a tetrahedral mesh and show it in different styles.""" | ||
from vedo import * | ||
from vedo import TetMesh, show, dataurl | ||
|
||
tetm = TetMesh(dataurl+'limb_ugrid.vtk') | ||
# Load a tetrahedral mesh from file | ||
tetm = TetMesh(dataurl + 'limb.vtu') | ||
tetm.compute_cell_size() | ||
print(tetm) | ||
tetm.cmap("Blues_r", "chem_0", on="cells").add_scalarbar() | ||
|
||
# Assign a color to each tetrahedron based on the value of "chem_0" | ||
tetm.celldata.select('chem_0').cmap("Blues_r").add_scalarbar() | ||
|
||
# Make a copy of tetm and shrink the tets | ||
msh = tetm.clone().shrink(0.5).tomesh().add_scalarbar() | ||
|
||
# Show the two meshes side by side with comments | ||
show([(tetm, __doc__), (msh, "..shrunk tetrahedra")], N=2).close() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
"""Threshold a TetMesh with a scalar array""" | ||
from vedo import * | ||
|
||
tetm = TetMesh(dataurl+'limb_ugrid.vtk') | ||
tetm = TetMesh(dataurl + "limb.vtu") | ||
|
||
# Threshold the tetrahedral mesh for values in the range: | ||
tetm.threshold(above=0.9, below=1) | ||
tetm.cmap('Accent', 'chem_0', on='cells') | ||
tetm.add_scalarbar3d('chem_0 expression levels', c='k', italic=1) | ||
|
||
tetm.celldata.select("chem_0").cmap("Accent") | ||
tetm.add_scalarbar3d("chem_0 expression levels", c="k", italic=1) | ||
|
||
show(tetm, __doc__, axes=1).close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.