rx.visualization.mpl_draw()
does not apply an edge_color
list to the correct edges
#1308
Labels
bug
Something isn't working
Information
What is the current behavior?
rustworkx.visualization.matplotlib.draw_edges()
does not correctly applyedge_color
of typelist
. Edge colors are not being applied to the edges ofgraph.edge_list()
in the correct order. Issue sourced from: qBraid/qBraid#802What is the expected behavior?
The entries of a given
edge_color
list should be mapped to the correct edges, corresponding to the order ofgraph.edge_list()
.Steps to reproduce the problem
The code below plots 3 nodes and 3 edges. Edge
(c, a)
should be coloredblue
. But if you run the code multiple times, you will find that the blue edge changes, and is not always(c, a)
.If you
pip install rustworkx<0.15.0
, and run the code again, it works fine.Therefore, I was able to trace this bug back the following commit: 646057a
Using the
draw_edges()
function from before that commit (i.e.rustworkx
version 0.14.2) resolves the issue. But the latest update seems to form anarrow_color
list that is not consistent with the indexing of theedge_color
list.The text was updated successfully, but these errors were encountered: