Circle Layout#
- graphistry.layout.circle.circle_layout(self, bounding_box=None, ring_spacing=None, point_spacing=None, partition_by=None, sort_by=None, ascending=True, na_position='last', ignore_index=True, engine=EngineAbstract.AUTO)#
Arranges nodes in a circular layout
If partition_by and and bounding_box df are provided, do as multiple circles
Each circle is sorted, by default by degree
The ring radius is set to circumscribe the bounding box of the nodes
Parameters#
- param self:
Plottable
- type self:
Plottable
- param bounding_box:
The bounding box for the circular layout, in the format (cx, cy, width, height), or a partition-keyed dataframe of the same. If not provided, the bounding box is determined based on the nodes’ positions.
- type bounding_box:
Optional[Tuple[float, float, float, float] | df[[partition_key, cx, cy, w, h]]]
- param ring_spacing:
The spacing between successive rings. Defaults to 1.0 if not provided.
- type ring_spacing:
Optional[float]
- param point_spacing:
The distance between nodes within a ring, along the circumference. Defaults to ring_spacing * 0.1 if not provided.
- type point_spacing:
Optional[float]
- param partition_by:
Column name or list of column names to sort nodes by. Defaults to None, in which case no sorting is applied.
- type partition_by:
Optional[Union[str, List[str]]]
- param sort_by:
Column name or list of column names to sort nodes by. Defaults to None, in which case sorting is by degree, in-degree, outdegree.
- type sort_by:
Optional[Union[str, List[str]]]
- param ascending:
Whether to sort ascending or descending.
- type ascending:
Union[bool, List[bool]]
- param na_position:
Where to position NaNs in the sorting order. Defaults to ‘last’.
- type na_position:
str
- param ignore_index:
Whether to ignore the index when sorting. Defaults to True.
- type ignore_index:
bool
- param engine:
The engine to use for computations (either ‘pandas’ or ‘cudf’). Defaults to EngineAbstract.AUTO.
- type engine:
Union[EngineAbstract, str]
Returns#
- Plottable
A graph object with nodes arranged in a circular layout.
- Parameters:
self (Plottable)
bounding_box (Tuple[float, float, float, float] | Any | None)
ring_spacing (float | None)
point_spacing (float | None)
partition_by (str | List[str] | None)
sort_by (str | List[str] | None)
ascending (bool | List[bool])
na_position (str)
ignore_index (bool)
engine (EngineAbstract | str)
- Return type:
- graphistry.layout.circle.print_gpu_memory_usage(prefix='')#