dwavesystems / dwavesystems/dwave-graphs
Error when providing edge_color to draw_chimera_embedding or other drawing functions.
- Dominant language
- Python
- Stars
- 95
- Forks
- 62
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 1
Description
**Description**
When `edge_color` is provided to draw_chimera_embedding or draw_pegasus_embedding function, an error is thrown
```
Traceback (most recent call last):
File "/home/shoeki/quan/b.py", line 6, in
dnx.draw_chimera_embedding(G, emb, width=0.5, show_labels=True, edge_color=["red"])
File "/home/shoeki/quan/venv/lib/python3.12/site-packages/dwave_networkx/drawing/chimera_layout.py", line 282, in draw_chimera_embedding
draw_embedding(G, chimera_layout(G), *args, **kwargs)
File "/home/shoeki/quan/venv/lib/python3.12/site-packages/dwave_networkx/drawing/qubit_layout.py", line 365, in draw_embedding
draw(G, layout, nodelist=nodelist, edgelist=background_edgelist,
TypeError: networkx.drawing.nx_pylab.draw() got multiple values for keyword argument 'edge_color'
```
**To Reproduce**
Here is a minimal code example
```
import dwave_networkx as dnx
G = dnx.chimera_graph(16, 16, 4)
emb = {"a": [0], "b": [1]}
dnx.draw_chimera_embedding(G, emb, width=0.5, show_labels=True, edge_color=["red"])
```
**Expected behavior**
A graph should be drawn without error
**Environment:**
- OS: WSL 2.5.9.0 (Ubuntu)
- Python version: 3.12.3
- dwave-networkx==0.8.18
**Additional context**
This issue is a similar error to https://github.com/dwavesystems/dwave-networkx/issues/162 and https://github.com/dwavesystems/dwave-networkx/pull/158, but has not been fixed yet.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.