Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bloch sphere with Matplotlib 3.3 and 3.4 #7517

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

jakelishman
Copy link
Member

Summary

In Matplotlib 3.4, the paths for cropping the figure down to its bounding box attempted to access Arrow3D._path3d without it being set. This just ensures it is set as soon as the patch is drawn onto a figure.

Details and comments

Fix #7488

@jakelishman jakelishman added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Jan 11, 2022
@jakelishman jakelishman added this to the 0.19.2 milestone Jan 11, 2022
@coveralls
Copy link

coveralls commented Jan 11, 2022

Pull Request Test Coverage Report for Build 1682829094

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 83.11%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/visualization/bloch.py 1 2 50.0%
Totals Coverage Status
Change from base Build 1681373973: -0.001%
Covered Lines: 51941
Relevant Lines: 62497

💛 - Coveralls

@jakelishman jakelishman changed the title Fix Bloch sphere with Matplotlib 3.4 Fix Bloch sphere with Matplotlib 3.3 and 3.4 Jan 11, 2022
@mergify mergify bot merged commit 4b9e21e into Qiskit:main Jan 11, 2022
mergify bot pushed a commit that referenced this pull request Jan 11, 2022
* Fix Bloch sphere with Matplotlib 3.4

* Include Matplotlib 3.3 in release note

(cherry picked from commit 4b9e21e)
@jakelishman jakelishman deleted the fix/mpl-3.4 branch January 11, 2022 22:33
mergify bot added a commit that referenced this pull request Jan 11, 2022
* Fix Bloch sphere with Matplotlib 3.4

* Include Matplotlib 3.3 in release note

(cherry picked from commit 4b9e21e)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'Arrow3D' object has no attribute '_path2d' while plotting bloch vector
3 participants