Draw NetworkX graphs with Altair
Project description
# Networkx in Altair
*Draw NetworkX graphs with Altair*
This library is still under heavy maintenance! I'm currently working on adding
all the functionality in NetworkX's draw functions. Stay tuned.
```python
import networkx as nx
import nx_altair as nxa
# Generate a random graph
G = nx.fast_gnp_random_graph(n=20, p=0.25)
# Compute positions for viz.
pos = nx.spring_layout(G)
# Draw the graph using Altair
viz = nxa.draw(G, pos=pos)
# Show it as an interactive plot!
viz.interactive()
```
![Altair networkx](docs/_img/readme.png)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nx_altair-0.0.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for nx_altair-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dc7fc82a4f20f91afd4aac36ce255f81a613a69edadfcfca72c07e735497cc2 |
|
MD5 | 4dd7dd1fe34cfded8d2ad6f8f9112382 |
|
BLAKE2b-256 | 7e4e0213bda9659111ccefe2cba876ba9fa356cc85b3f8a911fde17dcfa01268 |