You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
astropy_mpl_style visualization causes plt.colorbar() MatplotlibDeprecationWarning in Matplotlib 3.5 #12753
The astropy.visualization.astropy_mpl_style dictionary has 'axes.grid' set to True, this triggers a plt.colorbar() MatplotlibDeprecationWarning message for pyplot.imshow in Matplotlib version 3.5. Examples such as ones found here reference will trigger the warning message.
MatplotlibDeprecationWarning: Auto-removal of
grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed t
wo minor releases later; please call grid(False) first.
plt.colorbar()
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please leave a comment mentioning our software support engineer @embray, or send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].
I cannot tell if matplotlib/matplotlib#22285 had fixed your problem. Are you able to test out your use case with dev version of matplotlib? Or maybe even better, add a test that would trigger this in our test suite and see which jobs still fail? Thanks!
Activity
github-actions commentedon Jan 20, 2022
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please leave a comment mentioning our software support engineer @embray, or send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].
pllim commentedon Jan 20, 2022
I think this is related to matplotlib/matplotlib#21723 . We have
axes.gridset toTrue, so not sure why we are even seeing this.astropy/astropy/visualization/mpl_style.py
Line 32 in ed016c0
lanemeier commentedon Jan 20, 2022
Thanks for responding so quickly and mentioning this to matplotlib. I can work around it, but I wanted to alert the project about the potential issue with grids in styles.
Users may find the warning concerning. See https://stackoverflow.com/q/69999315/15531842
pllim commentedon Jan 21, 2022
Yes, definitely good to know of these warnings earlier than later. Thanks for the report!
pllim commentedon Jan 25, 2022
I cannot tell if matplotlib/matplotlib#22285 had fixed your problem. Are you able to test out your use case with dev version of matplotlib? Or maybe even better, add a test that would trigger this in our test suite and see which jobs still fail? Thanks!
lanemeier commentedon Jan 26, 2022
I pulled down the latest master matplotlib-3.6.0.dev1433+g9844e9ffad and confirmed that the warning message is gone.
Wish I had more time to add the test into the suite.