1
0

drawgraph 813 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. # You may redistribute this program and/or modify it under the terms of
  3. # the GNU General Public License as published by the Free Software Foundation,
  4. # either version 3 of the License, or (at your option) any later version.
  5. #
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. import cjdnsadmin.graphMaker as graph
  14. import networkx as nx
  15. import matplotlib.pyplot as plt
  16. G=graph.makeGraph()
  17. p=nx.spring_layout(G)
  18. nx.draw(G,pos=p,node_size=1000)
  19. plt.show()