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 matplotlib deprecation warning #6072

Merged
merged 3 commits into from
Apr 21, 2023

Conversation

dstrain115
Copy link
Collaborator

No description provided.

@dstrain115 dstrain115 requested review from a team, vtomole and cduck as code owners April 20, 2023 22:43
@dstrain115 dstrain115 requested a review from viathor April 20, 2023 22:43
@CirqBot CirqBot added the Size: XS <10 lines changed label Apr 20, 2023
@@ -218,7 +218,7 @@ def __format__(self, format_string):

_, mesh = random_heatmap.plot(ax)

colormap = mpl.cm.get_cmap(colormap_name)
colormap = mpl.colormaps.get_cmap(colormap_name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Issue matplotlib/matplotlib#20853 suggests we should perhaps just say

colormap = mpl.colormaps[colormap_name]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Maybe this will work in python 3.7 too.

@dstrain115 dstrain115 added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Apr 21, 2023
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Apr 21, 2023
@dstrain115 dstrain115 merged commit 03405d1 into quantumlib:master Apr 21, 2023
@dstrain115 dstrain115 removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Apr 21, 2023
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Fix matplotlib deprecation warning

* Fix for better deprecation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants