Removed the edge color extra definition (#532)

This commit is contained in:
2024-01-06 18:29:50 +01:00
committed by GitHub
parent e966bead37
commit 6568b02f3a
2 changed files with 1 additions and 16 deletions

View File

@ -109,15 +109,6 @@ def create_2d_graph( # noqa PLR0913
# ids = list(nx.get_node_attributes(graph, "id").values()) # ids = list(nx.get_node_attributes(graph, "id").values())
# # Get the Node Text # # Get the Node Text
# node_names = []
# for key, value in nodes.items():
# if "name" in value:
# node_names.append(value["name"])
# else:
# node_names.append(value["firstname"] + " " + value["lastname"])
# # Add Color and Names to the Scatter Plot.
# print(colors)
# print(node_names)
node_trace.marker.color = colors node_trace.marker.color = colors
node_trace.marker.line = {"color": "#2e2c2f", "width": 0.5} node_trace.marker.line = {"color": "#2e2c2f", "width": 0.5}
node_trace.text = node_names node_trace.text = node_names

View File

@ -177,13 +177,7 @@ def create_3d_graph( # noqa : PLR0913
node_trace.marker.size = list(np.cbrt(metrics[metric]) * 200) node_trace.marker.size = list(np.cbrt(metrics[metric]) * 200)
# Set the Color and width of Edges for better highlighting. # Set the Color and width of Edges for better highlighting.
edge_colors = [] edge_trace.line = {"color": "rgb(255,105,180)", "width": edge_thickness}
for row in edges:
if row["type"] == "HAFTENDER_GESELLSCHAFTER":
edge_colors.append("rgb(255,0,0)")
else:
edge_colors.append("rgb(255,105,180)")
edge_trace.line = {"color": edge_colors, "width": edge_thickness}
# Add Relation_Type as a Description for the edges. # Add Relation_Type as a Description for the edges.
if edge_annotation: if edge_annotation: