graphenv.examples.tsp.graph_utils.plot_network

plot_network(G, path=None, draw_all_edges=True)[source]

Plots the network and a path if specified.

Parameters
  • G – networkx graph.

  • path (Optional[list]) – List of node indexes in a path. Defaults to None.

Returns

(fig, ax) from plt.subplots

Return type

Tuple[any, any]