Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

draw_chimera matplotlib deprecation warning

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
matplotlib, python

Research direction

Start in dwave_networkx/drawing/qubit_layout.py around line 195, then run the draw_chimera reproduction with matplotlib 3.3.2. Done means the Chimera graph still renders and the Matplotlib deprecation warning is no longer emitted.

Written by the indexing model from the issue text.

Description

Description
draw_chimera fails with text error:
/home/jraymond/PYTHON3-VENV/OCEANSDK/lib/python3.6/site-packages/dwave_networkx-0.8.8-py3.6.egg/dwave_networkx/drawing/qubit_layout.py:195: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
ax = fig.add_axes([0.01, 0.01, 0.98, 0.98])

To Reproduce
import dwave_networkx as dnx
chimera_graph = dnx.chimera_graph(m=4)
dnx.draw_chimera(chimera_graph)

Expected behavior
Should draw graph and not print error

Environment:

  • OS: [Ubuntu 16.04.4 LTS]
  • Python version: [e.g. 3.6.9]
    matplotlib 3.3.2
    dwave_networkx 0.8.8

Additional context

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dwavesystems/dwave-graphs

All issues in dwavesystems/dwave-graphs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.