pyalluv.clusters¶
-
class
Cluster(height, anchor=None, width=1.0, label=None, **kwargs)[source]¶ Bases:
objectThis class defines the cluster objects for an alluvial diagram.
Note
The vertical position of a cluster will be set when creating a
AlluvialPlot.Parameters: - height (float, int) – The cluster size which will translate into the height of this cluster.
- anchor (float (default=None)) – Set the anchor position. Either only the horizontal position, both \((x, y)\) or nothing can be provided.
- width (float (default=1.0)) – Set the cluster width.
- label (str (default=None)) – The label for this cluster, that can be shown in the diagram
- optional parameter (**kwargs) –
- x_anchor:
'center','left'or'right'(default=’center’) - Determine where the anchor position is relative to the rectangle that will represent this cluster. Options are either the left or right corner or centered:
- linewidth: float (default=0.0)
- Set the width of the line surrounding a cluster.
- label_margin: tuple(horizontal, vertical)
- Sets horizontal and vertical margins for the label of a cluster.
- x_anchor:
-
x_anchor¶ Anchor position relative to the rectangle representing the cluster. Possible values are:
'center','left'or'right'.Type: str