File: plot_simple_path.py

package info (click to toggle)
networkx 2.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,764 kB
  • sloc: python: 78,797; makefile: 141; javascript: 120
file content (13 lines) | stat: -rw-r--r-- 173 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
===========
Simple Path
===========

Draw a graph with matplotlib.
"""
import matplotlib.pyplot as plt
import networkx as nx

G = nx.path_graph(8)
nx.draw(G)
plt.show()