pyrc.core.visualization.vpython#
- color_cells_by_attribute(nodes: list[Cell], attribute: str, opacity: float | int = 0.3, *args, **kwargs)#
Color nodes based on a specified attribute value.
- Parameters:
nodes (list[Cell]) – List of Cell objects to color
attribute (str) – Attribute path to use for coloring (e.g., ‘material.name’ or ‘x’)
opacity (float, optional) – Opacity value that is set to every vbox.
args – Passed to cycle_palette_vpython Can be used to choose the color map like: cmap=”managua50”
kwargs – Passed to cycle_palette_vpython Can be used to choose the color map like: cmap=”managua50”