Interactive Graph visualization for networkX Graphs
Project description
bokeh-graph
Interactive Graph visualization for networkX Graphs
Basic Usage
from bokehgraph import BokehGraph
import networkx as nx
graph = nx.karate_club_graph()
plot = BokehGraph(graph)
plot.draw()
Jupyter Notebooks
To show graphs inlined in Jupyter Notebooks set the inline
parameter
plot = BokehGraph(graph, width=300, height=300, inline=True)
Draw parameters
The BokehGraph.draw()
method has a couple of parameters to individualize the resulting plot:
node_color="firebrick"
Set node color to any valid bokeh color (only respected if color_by is not set)
palette=None
Set palette to any valid bokeh color palette.
A list of palettes can be found under: https://docs.bokeh.org/en/latest/docs/reference/palettes.html
color_by=None
Set to a node attribute to color nodes by this attribute
edge_color="navy"
Set node color to any valid bokeh color
edge_alpha=0.17
Set edge alpha to a value between [0,1]
node_alpha=0.7
Set edge alpha to a value between [0,1]
node_size=9
Set node size
max_colors=-1
Set a maximum number of colors for color_by (or -1 to use as many colors as possible).
This must be < 256 and lower than the maximum number of colors of your selected palette.
It will divide the attribute space into evenly spaced to colors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bokehgraph-0.6.3.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file bokehgraph-0.6.3.tar.gz
.
File metadata
- Download URL: bokehgraph-0.6.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a867cb0ba6262150f9b022e85c530f379ec8600c5b07dc32a1589672c2e7c705 |
|
MD5 | d3e6afbde3e55ecc893106df1d4f0a81 |
|
BLAKE2b-256 | 56bf8cd4d56bfa93e50215a37535436f9e7da54c232d0ebaf9737df48a412b5e |
File details
Details for the file bokehgraph-0.6.3-py3-none-any.whl
.
File metadata
- Download URL: bokehgraph-0.6.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375c72d0c62fe84a47162c4bda868ec18fd6702819999b1104025b3b17131ff4 |
|
MD5 | 9c9f8f43223dedb7f1e2b01f368cab8b |
|
BLAKE2b-256 | 85e66641df84958ec7fd3d0908036f19d33ddebb53919ad269ef7632a17096ae |