Skip to content

koorukuroo/pynetviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyNetViz(Python Network Visualization)

A python network(graph) visualization with networkx

It works in IPython(Jupyter)

Demo : http://goo.gl/7U2IlV

Installing

pip install pynetviz

Usage

import networkx as nx
import pynetviz.sigmajs as nvs

G = nx.Graph()
G.add_edges_from([(1,2),(2,3),(3,4),(5,6)])
G.add_edge(1, 3)
G.add_edge(1, 6)
nvs.make_gexf(G)
nvs.make_html(drawEdges='true')
nvs.view_html()

Output:

Network(Graph) Visualization

Layout

G = nx.Graph()
G.add_edges_from([(1,2),(2,3),(3,4),(5,6)])
G.add_edge(1, 3)
G.add_edge(1, 6)
layout = nx.spring_layout(G)
nvs.make_gexf(G, layout)
nvs.make_html(drawEdges='true')
nvs.view_html()

Example

G = nx.karate_club_graph()
layout = nx.spring_layout(G)
nvs.make_gexf(G, layout, size=nx.degree_centrality(G))
nvs.make_html(drawEdges='true')
nvs.view_html(height=1000)
  • G Graph object of networkx.
  • layout Position nodes.
  • size Size nodes.
  • drawEdges True or False.
  • height Window height size.

About

Python Network(Graph) Visualization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages