Skip to main content

Convenience package for drawing NetworkX graphs

Project description

nxquickplot

Convenient plotting for graphs in NetworkX. These functions are rather asymmetric/non-composable because they aim to literally capture concrete use patterns rather than abstracting over them. If you need other stuff, just use the raw draw_networkx API.

API

Draw the graph with a force-directed layout

from nxquickplot import plot_force
import networkx

g = networkx.DiGraph()

g.add_node('Alice')
g.add_node('Bob')
g.add_edge('Alice', 'Bob')

plot_force(g)

Draw the graph with a random deterministic layout

from nxquickplot import plot_random_deterministic
import networkx

g = networkx.DiGraph()

g.add_node('Alice')
g.add_node('Bob')
g.add_edge('Alice', 'Bob')

plot_random_deterministic(g)

Draw the graph plotting a certain attribute rather than the node ID

from nxquickplot import plot_with_attr
import networkx

g = networkx.DiGraph()

g.add_node('Alice', age=42)
g.add_node('Bob', age=31)
g.add_edge('Alice', 'Bob')

plot_with_attr(g, 'age')

This must be force directed.

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

nxquickplot-1.0.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nxquickplot-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file nxquickplot-1.0.0.tar.gz.

File metadata

  • Download URL: nxquickplot-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for nxquickplot-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d9cecb27f5322ab6bf472e90d6f5083048e6dbe2015f56f4dfa8fdcc55e56e24
MD5 34e3cbf49ab1d9d7793fb388731315b6
BLAKE2b-256 02fc82e4cf105cc2958cf1867b81410e76ba6313ead01f68e153eba8f2ff1174

See more details on using hashes here.

File details

Details for the file nxquickplot-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nxquickplot-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for nxquickplot-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fab2fd870eb0030aff1d4913c3a166e29e7e264ee11c8150a12913acf666c289
MD5 77c73ca5e8f8460075ffb416334f1598
BLAKE2b-256 1085fa46b5dba0c5b56f35f78d7efeea8b483892ce85c25fa3063ee3cda64647

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page