GraphObject.draw_nodes

GraphObject.draw_nodes(nodes=None, color=None, text=None)[source]

Draw the nodes of the graph.

Parameters:
nodeslist[int], optional

The nodes to include in the drawing. Default is all nodes.

colortuple[float, float, float] | compas.colors.Color | dict[int, tuple[float, float, float] | compas.colors.Color], optional

The color of the nodes, as either a single color to be applied to all nodes, or a color dict, mapping specific nodes to specific colors.

textdict[int, str], optional

The text labels for the nodes as a text dict, mapping specific nodes to specific text labels.

Returns:
list

The identifiers of the objects representing the nodes in the visualization context.