2.0.0
Major update. If you prefer the previous version, fix it to version 1.0.3
- The code is refactored entirely
- Many redundant functions are removed
- code complexity is lowered
- docstrings are updated and included
- Classes are used for more ease of use
- node properties can easily be adjusted
- edge properties can easily be adjusted
- Documentation pages are available
Example how to create networks using d3graph
:
from d3graph import d3graph, vec2adjmat
source = ['node A', 'node F', 'node B', 'node B', 'node B', 'node A', 'node C', 'node Z']
target = ['node F', 'node B', 'node J', 'node F', 'node F', 'node M', 'node M', 'node A']
weight = [5.56, 0.5, 0.64, 0.23, 0.9, 3.28, 0.5, 0.45]
# Convert to adjacency matrix
adjmat = vec2adjmat(source, target, weight=weight)
# Initialize with default parameters
d3 = d3graph()
# Proces adjmat
d3.graph(adjmat)
# Set node properties using the set_node_properties functionality
d3.set_node_properties(color=adjmat.columns.values)
# Plot
d3.show()
# Simply make changes in the node properties and plot again with d3.show()
print(d3.node_properties)
# Simply make changes in the edge properties and plot again d3.show()
print(d3.edge_properties)