def draw_transmat_graph_outer(Go, Gi, edge_threshold=0, lw=1, ec='0.2', nc='k', node_size=15):
num_states = Go.number_of_nodes()
edgewidth = [ d['weight'] for (u,v,d) in Go.edges(data=True)]
edgewidth = np.array(edgewidth)
edgewidth[edgewidth<edge_threshold] = 0
npos=double_circular_layout(Gi, scale=1, direction='CW')
nx.draw_networkx_edges(Go, npos, alpha=1.0, width=edgewidth*lw, edge_color=ec)
nx.draw_networkx_nodes(Go, npos, node_size=node_size, node_color=nc,alpha=1.0)
ax = plt.gca()
ax.set_aspect('equal')
return ax
评论列表
文章目录