milkviz.graph#
- milkviz.graph(edges, nodes=None, nodes_size=None, nodes_color='#69B0AC', edges_width=None, edges_color='#F7C242', nodes_size_range=None, nodes_color_range=None, edges_width_range=None, edges_color_range=None, node_cmap='Purples', edge_cmap='RdBu', node_cbar_kw=None, edge_cbar_kw=None, node_shape='o', sizes=(100, 1500), linewidth=(1, 10), connectionstyle='arc3,rad=0.2', layout='kamada_kawai_layout', arrowstyle='-', ax=None) Axes #
Graph layout
- Parameters
- nodesarray-like
The graph nodes, a list of nodes
- edgesarray-like
The graph data, a list of (source, target)
- nodes_sizearray-like
The size of nodes
- nodes_color
The color of nodes
- edges_width
The width array that map to edge width
- edges_color
The color array that map to edges color
- nodes_size_range
Use to remap the nodes size, overwrite the min, max of nodes_size array
- nodes_color_range
Use to remap the nodes colors, overwrite the min, max of nodes_color array
- edges_width_range
Use to remap the edges’ width, overwrite the min, max of edges_size array
- edges_color_range
Use to remap the edges colors, overwrite the min, max of edges_color array
- node_cmap
The colormap for node
- edge_cmap
The colormap for edge
- node_cbar_kw
To control the cbar of node
- edge_cbar_kw
To control the cbar of edge
- sizes
The range of size
- node_shape
The shape of the node, a matplotlib marker.
- linewidth
Line width of symbol border
- connectionstyle
Pass the connectionstyle parameter to create curved arc of rounding radius rad. For example, connectionstyle=’arc3,rad=0.2’. See
matplotlib.patches.ConnectionStyle
andmatplotlib.patches.FancyArrowPatch
for more info.- layoutSee
networkx.drawing.layout()
- arrowstyleFor directed graphs and arrows==True defaults to ‘-|>’, See
matplotlib.patches.ArrowStyle
for more options.- ax