Releases: erdogant/d3graph
Releases · erdogant/d3graph
v2.2.1
v2.2.0
- Fix for changing edge colors #7
- jinja2 latest version is supported again #9
- added Two scaler for node size and edge width (zscore and minmax). The minmax was the default but frequently resulted in skewed values, and thus sizes and width because of outliers. The zscore is more robust against outliers and now the default.
- edge_color can now also be based on clustering colors:
d3.set_node_properties(edge_color='cluster')
- The minimum and maximum range of the node size can be set with the parameter (minmax):
d3.set_node_properties(minmax=[10, 50])
- The minimum and maximum range of the edge width can be set with the parameter (minmax):
d3.set_edge_properties(minmax=[1, 10])
- Documentation pages updated
v2.1.1
v2.1.0
v2.0.5
v2.0.4
v2.0.3
v2.0.2
- Fix for slider range.
- label will replace the node text if used.
- hover will show text when hovering over a node.
from d3graph import d3graph
d3 = d3graph()
adjmat = d3.import_example('bigbang')
d3.graph(adjmat)
d3.set_node_properties(label=adjmat.columns.values+' are the names', hover=['\nFemale\nMore info', 'Female', 'Male', 'Male', 'Female', 'Male', 'Male'])
d3.show()
v2.0.1
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)