Error when providing edge_color to draw_chimera_embedding or other drawing functions.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start with drawing/qubit_layout.py in draw_embedding, where the traceback shows the conflicting edge_color argument, and compare how drawing/chimera_layout.py and the Pegasus embedding wrapper pass arguments through. Reproduce the provided example and confirm that edge_color works for the affected drawing functions without raising an error.
Written by the indexing model from the issue text.
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 <module>
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.
- Dominant language
- Python
- Stars
- 94
- Forks
- 62
- Avg merge
- 13h 11m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dwavesystems/dwave-graphs
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dwavesystems/dwave-graphs#232 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
dwavesystems/dwave-graphs#260 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dwavesystems/dwave-graphs#258 ·
-
bug/fix
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dwavesystems/dwave-graphs#255 · 8 comments ·
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dwavesystems/dwave-graphs#253 ·
All issues in dwavesystems/dwave-graphs
Similar issues
-
Link Checker ReportOpenautomated issue linkchecker report
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
QuantEcon/lecture-python.myst#1098 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
podly-pure-podcasts/podly_pure_podcasts#279 ·
Maintainers usually reply within 1 day
-
template-proposal
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
OpenShot/openshot-qt#6230 ·
Maintainers usually reply within 1 day