Fixed spagetti connection by adding breaks. (#366)

This commit is contained in:
2023-11-13 19:27:03 +01:00
committed by GitHub
parent d0677287b6
commit 31221a1055
2 changed files with 5 additions and 3 deletions

View File

@ -70,15 +70,14 @@ def create_2d_graph( # noqa PLR0913
x1, y1 = pos[edge[1]]
edge_x.append(x0)
edge_x.append(x1)
# edge_x.append(None)
edge_x.append(float("NaN"))
edge_y.append(y0)
edge_y.append(y1)
# edge_y.append(None)
edge_y.append(float("NaN"))
edge_weight_x.append((x1 + x0) / 2)
edge_weight_y.append((y1 + y0) / 2)
# edge_weight_y.append(None)
# Add the Edges to the scatter plot according to their Positions.
edge_trace = go.Scatter(
x=edge_x,

View File

@ -73,12 +73,15 @@ def create_3d_graph( # noqa : PLR0913
edge_x.append(x0)
edge_x.append(x1)
edge_x.append(float("NaN"))
edge_y.append(y0)
edge_y.append(y1)
edge_y.append(float("NaN"))
edge_z.append(z0)
edge_z.append(z1)
edge_z.append(float("NaN"))
# Calculate edge mid
edge_weight_x.append((x0 + x1) / 2)