Group-in-a-Box Layout

Group-in-a-Box Layout#

graphistry.layout.gib.gib.group_in_a_box_layout(self, partition_alg=None, partition_params=None, layout_alg=None, layout_params=None, x=0, y=0, w=None, h=None, encode_colors=True, colors=None, partition_key=None, engine='auto')#

Perform a group-in-a-box layout on a graph, supporting both CPU and GPU execution modes.

The layout algorithm groups nodes into clusters and organizes them within rectangular bounding boxes, optionally applying color encoding based on a partitioning scheme.

Args:

partition_alg (Optional[str]): The algorithm to use for partitioning the graph nodes. partition_params (Optional[dict]): Parameters for the partition algorithm. layout_alg (Optional[str]): The layout algorithm to arrange nodes within each partition. layout_params (Optional[dict]): Parameters for the layout algorithm. x (int, optional): The x-coordinate for the top-left corner of the layout. Default is 0. y (int, optional): The y-coordinate for the top-left corner of the layout. Default is 0. w (Optional[int]): The width of the layout. If None, automatically determined. h (Optional[int]): The height of the layout. If None, automatically determined. encode_colors (bool, optional): Whether to apply color encoding to nodes based on partitions. Default is True. colors (Optional[List[str]]): List of colors to use for the partitions. partition_key (Optional[str]): The key for partitioning nodes. Default is None. engine (Union[Engine, Literal[“auto”]], optional): Execution engine for the layout, either “auto”, CPU, or GPU. Default is “auto”.

Returns:

Plottable: An object representing the layout that can be plotted or visualized.

Parameters:
  • colors (List[str] | None)

  • partition_key (str | None)

  • engine (Engine | Literal['auto'])

Return type:

Plottable

graphistry.layout.gib.gib.resolve_partition_key(g, partition_key=None)#