get_block_edge_gradient

get_block_edge_gradient#

graph_tool.inference.get_block_edge_gradient(g, be, cmap=None)[git][source]#

Get edge gradients corresponding to the block membership at the endpoints of the edges given by the be edge property map.

Parameters:
gGraph

The graph.

beEdgePropertyMap

Vector-valued edge property map with the block membership at each endpoint.

cmapmatplotlib.colors.Colormap (optional, default: None)

Color map used to construct the gradient. If not provided, graph_tool.draw.default_cm will be used.

Returns:
cpEdgePropertyMap

A vector-valued edge property map containing a color gradient.

See also

OverlapBlockState

Overlapping stochastic block model

graph_tool.draw.graph_draw

Draw a graph with Cairo