newton.utils.plot_graph#
- newton.utils.plot_graph(vertices, edges, edge_labels=None, node_labels=None, node_colors=None)[source]#
Plots a graph using matplotlib and networkx.
- Parameters:
vertices – A numpy array of shape (N,) containing the vertex indices.
edges – A numpy array of shape (M, 2) containing the vertex indices of the edges.
edge_labels – A list of edge labels.
node_labels – A list of node labels.
node_colors – A list of node colors.