Skip to content

Commit 35a4ba4

Browse files
committed
fix: fix edge label plotting in Plotly
1 parent 47ec024 commit 35a4ba4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/igraph/drawing/plotly/graph.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ def draw(self, graph, *args, **kwds):
250250
"text": [],
251251
"x": [],
252252
"y": [],
253-
"color": [],
253+
# "textfont_color": [],
254254
# FIXME: horizontal/vertical alignment, offset, etc?
255255
}
256256
for label, visual_edge, edge in edge_label_iter:
257257
# Ask the edge drawer to propose an anchor point for the label
258258
src, dest = edge.tuple
259259
src_vertex, dest_vertex = vertex_builder[src], vertex_builder[dest]
260260
(x, y), (halign, valign) = edge_drawer.get_label_position(
261-
edge,
261+
visual_edge,
262262
src_vertex,
263263
dest_vertex,
264264
)
@@ -268,7 +268,9 @@ def draw(self, graph, *args, **kwds):
268268
lab_args["text"].append(label)
269269
lab_args["x"].append(x)
270270
lab_args["y"].append(y)
271-
lab_args["color"].append(visual_edge.label_color)
271+
# FIXME: colors do not work yet; apparently we need to convert
272+
# visual_edge.label_color to Plotly's format
273+
# lab_args["textfont_color"].append(visual_edge.label_color)
272274
stroke = plotly.graph_objects.Scatter(
273275
mode="text",
274276
**lab_args,

0 commit comments

Comments
 (0)