opto.trace.nodes.NodeVizStyleGuide#
- class NodeVizStyleGuide[source]#
A class to provide a standardized way to visualize nodes in a graph.
- style#
Defines the style of the visualization. Default is ‘default’.
- Type:
str
- print_limit#
Sets the maximum number of characters to print for node descriptions and content. Default is 100.
- Type:
int
Initialize the NodeVizStyleGuide.
- Parameters:
style (str, optional) – The style of visualization to use. Defaults to ‘default’.
print_limit (int, optional) – Maximum characters to print for descriptions and content. Defaults to 100.
Methods
get_attrs
(x)Get the attributes for a node based on the style guide.
get_color
(x)Assign a color to a node.
get_label
(x)Construct a label for a node.
Determine the shape of a node.
get_style
(x)Set the style of a node.
- __init__(style='default', print_limit=100)[source]#
Initialize the NodeVizStyleGuide.
- Parameters:
style (str, optional) – The style of visualization to use. Defaults to ‘default’.
print_limit (int, optional) – Maximum characters to print for descriptions and content. Defaults to 100.
- __new__(**kwargs)#