You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using d3graph.graph() or d3graph.set_node_properties(), the order of properties provided needs to match the order of the instance attribute adjmat. I don't hink this behaviour is documented and it can lead to some issues.
The adjmat attribute does not maintain the same order as the user-provided adjacency matrix. This discrepancy arises because d3graph.graph() calls d3graph.set_edge_properties(), which reorders the matrix into alphabetical order.
Attempting to provide properties in alphabetical order may fail. d3graph.graph() calls data_checks, which calls remove_special_chars. This changes the node names, which can also change their alphabetical order (for example if the name start with a special character, like "µm_wave"). Thus d3graph.set_edge_properties() might produce a different order for adjmat than one would obtain ordering the user-provided adjacency matrix.
Suggested fix
Document that properties need to given in alphabetic order.
Make the removal of optional chars optional and/or issue a warning if special chars are removed from the node names
The text was updated successfully, but these errors were encountered:
Issue
When using
d3graph.graph()
ord3graph.set_node_properties()
, the order of properties provided needs to match the order of the instance attributeadjmat
. I don't hink this behaviour is documented and it can lead to some issues.adjmat
attribute does not maintain the same order as the user-provided adjacency matrix. This discrepancy arises becaused3graph.graph()
callsd3graph.set_edge_properties()
, which reorders the matrix into alphabetical order.d3graph.graph()
callsdata_checks
, which callsremove_special_chars
. This changes the node names, which can also change their alphabetical order (for example if the name start with a special character, like "µm_wave"). Thusd3graph.set_edge_properties()
might produce a different order foradjmat
than one would obtain ordering the user-provided adjacency matrix.Suggested fix
The text was updated successfully, but these errors were encountered: