(Deprecated) Quick Hive Plots#
hive_plot_n_axes() is deprecated and will be removed from hiveplotlib in the 0.28.0 release.
- hiveplotlib.hive_plot_n_axes(edges: ndarray | List[ndarray], axes_assignments: List[List[Hashable | None] | ndarray | None], sorting_variables: List[Hashable], nodes: NodeCollection | List[Node] | None = None, node_list: list[Node] | None = None, axes_names: List[Hashable] | None = None, repeat_axes: List[bool] | None = None, vmins: List[float] | None = None, vmaxes: List[float] | None = None, angle_between_repeat_axes: float = 40, orient_angle: float = 0, all_edge_kwargs: Dict | None = None, edge_list_kwargs: List[Dict | None] | None = None, cw_edge_kwargs: Dict | None = None, ccw_edge_kwargs: Dict | None = None, repeat_edge_kwargs: Dict | None = None, suppress_deprecation_warning: bool = False) BaseHivePlot#
Generate a
BaseHivePlotInstance with an arbitrary number of axes, specified by passing a partition of node IDs.DEPRECATED. This function is being deprecated in favor of the revised
HivePlotclass. This function will be removed in version0.28.0.Repeat axes can be generated for any desired subset of axes, but repeat axes will be sorted by the same variable as the original axis.
Axes will be added in counterclockwise order.
Axes will all be the same length and position from the origin.
Changes to all the edge kwargs can be affected with the
all_edge_kwargsparameter. If providing multiple sets of edges (e.g. alistinput for theedgesparameter), one can also provide unique kwargs for each set of edges by specifying a correspondinglistof kwargs with theedge_list_kwargsparameter.Edges directed counterclockwise will be drawn as solid lines by default. Clockwise edges will be drawn as solid lines by default. All CW / CCW lines kwargs can be changed with the
cw_edge_kwargsandccw_edge_kwargsparameters, respectively. Edges between repeat axes will be drawn as solid lines by default. Repeat edges operate under their own set of visual kwargs (repeat_edge_kwargs) as clockwise vs counterclockwise edges don’t have much meaning when looking within a single group.Specific edge kwargs can also be changed by running the
add_edge_kwargs()method on the resultingHivePlotinstance, where the specifiedtagofedgesto change will be the index value in the list of lists inedges(note: a tag is only necessary if theindicesinput is a list of lists, otherwise there would only be a single tag of edges, which can be inferred).There is a hierarchy to these various kwarg arguments. That is, if redundant / overlapping kwargs are provided for different kwarg parameters, a warning will be raised and priority will be given according to the below hierarchy (Note:
cw_edge_kwargs, ``ccw_edge_kwargs, andrepeat_edge_kwargsdo not interact with each other in practice, and are therefore equal in the hierarchy):edge_list_kwargs>cw_edge_kwargs/ccw_edge_kwargs/repeat_edge_kwargs>all_edge_kwargs.- Parameters:
nodes –
NodeCollectionor list ofNodeinstances to go into outputBaseHivePlotinstance. Must provide only one ofnodesornode_list.node_list – List of
Nodeinstances to go into outputBaseHivePlotinstance. Must provide only one ofnodesornode_list.edges –
(n, 2)array ofHashablevalues representing pointers to specificNodeinstances. The first column is the “from” and the second column is the “to” for each connection. Alternatively, one can provide a list of two-column arrays, which will allow for plotting different sets of edges with different kwargs.axes_assignments – list of lists of node unique IDs. Each list of node IDs will be assigned to a separate axis in the resulting
BaseHivePlotinstance, built out in counterclockwise order. IfNoneis provided as one of the elements instead of a list of node IDs, then all unassigned nodes will be aggregated onto this axis.sorting_variables – list of
Hashablevariables on which to sort each axis, where the ith indexHashablecorresponds to the ith index list of nodes inaxes_assignments(e.g. the ith axis of the resultingBaseHivePlot).axes_names – list of
Hashablenames for each axis, where the ith indexHashablecorresponds to the ith index list of nodes inaxes_assignments(e.g. the ith axis of the resultingBaseHivePlot). DefaultNonenames the groups as “Group 1,” “Group 2,” etc.repeat_axes – list of
boolvalues of whether to generate a repeat axis, where the ith index bool corresponds to the ith index list of nodes inaxes_assignments(e.g. the ith axis of the resultingHivePlot). ATruevalue generates a repeat axis. DefaultNoneassumes no repeat axes (e.g. allFalse).vmins – list of
floatvalues (orNonevalues) specifying the vmin for each axis, where the ith index value corresponds to the ith index list of nodes inaxes_assignments(e.g. the ith axis of the resultingBaseHivePlot). ANonevalue infers the global min for that axis. DefaultNoneuses the global min for all the axes.vmaxes – list of
floatvalues (orNonevalues) specifying the vmax for each axis, where the ith index value corresponds to the ith index list of nodes inaxes_assignments(e.g. the ith axis of the resultingBaseHivePlot). ANonevalue infers the global max for that axis. DefaultNoneuses the global max for all the axes.angle_between_repeat_axes – angle between repeat axes. Default 40 degrees.
orient_angle – rotates all axes counterclockwise from their initial angles (default 0 degrees).
all_edge_kwargs – kwargs for all edges. Default
Nonespecifies no additional kwargs.edge_list_kwargs – list of dictionaries of kwargs for each element of
edgeswhenedgesis alist. The ith set of kwargs inedge_list_kwargswill only be applied to edges constructed from the ith element ofedges. DefaultNoneprovides no additional kwargs. Note, list must be same length asedges.cw_edge_kwargs – kwargs for edges going clockwise. Default
Nonespecifies a solid line.ccw_edge_kwargs – kwargs for edges going counterclockwise. Default
Nonespecifies a solid line.repeat_edge_kwargs – kwargs for edges between repeat axes. Default
Nonespecifies a solid line.suppress_deprecation_warning – whether to suppress the
DeprecationWarning.
- Returns:
BaseHivePlotinstance.