Partition¶
- detroit.partition() Partition¶
Builds a new partition layout with the default settings.
- Returns:
Partition object
- Return type:
- class detroit.hierarchy.partition.Partition¶
Partition layout
- __call__(root: Node) Node¶
Lays out the specified root hierarchy, assigning the following properties on root and its descendants:
node.x0- the left edge of the rectanglenode.y0- the top edge of the rectanglenode.x1- the right edge of the rectanglenode.y1- the bottom edge of the rectangle
You must call
root.sumbefore passing the hierarchy to the partition layout. You probably also want to call root.sort to order the hierarchy before computing the layout.
- set_round(round: bool) Partition¶
Enables or disables rounding according to the given boolean and returns this partition layout.
- Parameters:
round (bool) – Round boolean value
- Returns:
Itself
- Return type: