[Matplotlib-users] deprecation of mpl_toolkits' colorbar implementation - substitute?
Slavin, Jonathan
jslavin at cfa.harvard.edu
Thu Dec 2 18:01:59 EST 2021
Hi,
I'm wanting to do something like in the example "Demo Axes Grid", the 2nd
case where the grid has a single colorbar. That works the way I want it,
but I get a deprecation warning:
MatplotlibDeprecationWarning: Since 3.2, mpl_toolkits's own colorbar
implementation is deprecated; it will be removed two minor releases later.
Set the 'mpl_toolkits.legacy_colorbar' rcParam to False to use Matplotlib's
default colorbar implementation and suppress this deprecation warning.
So, I understand that that warning can be suppressed, but I'd rather find a
non-deprecated way of doing the same thing. So far I haven't found it. The
particular command that results in the warning is:
grid.cbar_axes[0].colorbar(image)
I don't know of a way to add a colorbar to the grid of images the way I
want it. Any help would be appreciated.
Thanks,
Jon
--
Jonathan D. Slavin
Astrophysicist - High Energy Astrophysics Division
Center for Astrophysics | Harvard & Smithsonian
Office: (617) 496-7981 | Cell: (781) 363-0035
60 Garden Street | MS 83 | Cambridge, MA 02138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20211202/07f97d4e/attachment.html>
More information about the Matplotlib-users
mailing list