(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 BaseHivePlot Instance 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 HivePlot class. This function will be removed in version 0.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_kwargs parameter. If providing multiple sets of edges (e.g. a list input for the edges parameter), one can also provide unique kwargs for each set of edges by specifying a corresponding list of kwargs with the edge_list_kwargs parameter.

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_kwargs and ccw_edge_kwargs parameters, 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 resulting HivePlot instance, where the specified tag of edges to change will be the index value in the list of lists in edges (note: a tag is only necessary if the indices input 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, and repeat_edge_kwargs do 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:
  • nodesNodeCollection or list of Node instances to go into output BaseHivePlot instance. Must provide only one of nodes or node_list.

  • node_list – List of Node instances to go into output BaseHivePlot instance. Must provide only one of nodes or node_list.

  • edges(n, 2) array of Hashable values representing pointers to specific Node instances. 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 BaseHivePlot instance, built out in counterclockwise order. If None is 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 Hashable variables on which to sort each axis, where the ith index Hashable corresponds to the ith index list of nodes in axes_assignments (e.g. the ith axis of the resulting BaseHivePlot).

  • axes_names – list of Hashable names for each axis, where the ith index Hashable corresponds to the ith index list of nodes in axes_assignments (e.g. the ith axis of the resulting BaseHivePlot). Default None names the groups as “Group 1,” “Group 2,” etc.

  • repeat_axes – list of bool values of whether to generate a repeat axis, where the ith index bool corresponds to the ith index list of nodes in axes_assignments (e.g. the ith axis of the resulting HivePlot). A True value generates a repeat axis. Default None assumes no repeat axes (e.g. all False).

  • vmins – list of float values (or None values) specifying the vmin for each axis, where the ith index value corresponds to the ith index list of nodes in axes_assignments (e.g. the ith axis of the resulting BaseHivePlot). A None value infers the global min for that axis. Default None uses the global min for all the axes.

  • vmaxes – list of float values (or None values) specifying the vmax for each axis, where the ith index value corresponds to the ith index list of nodes in axes_assignments (e.g. the ith axis of the resulting BaseHivePlot). A None value infers the global max for that axis. Default None uses 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 None specifies no additional kwargs.

  • edge_list_kwargs – list of dictionaries of kwargs for each element of edges when edges is a list. The ith set of kwargs in edge_list_kwargs will only be applied to edges constructed from the ith element of edges. Default None provides no additional kwargs. Note, list must be same length as edges.

  • cw_edge_kwargs – kwargs for edges going clockwise. Default None specifies a solid line.

  • ccw_edge_kwargs – kwargs for edges going counterclockwise. Default None specifies a solid line.

  • repeat_edge_kwargs – kwargs for edges between repeat axes. Default None specifies a solid line.

  • suppress_deprecation_warning – whether to suppress the DeprecationWarning.

Returns:

BaseHivePlot instance.