Summary
In v3.4.0rc1, calls to a colormap's set_bad, set_under, and set_over functions now trigger a deprecation warning saying that modifying a registered color map will soon be disallowed. This seems overly protective. If users have called any of these routines, then they are presumably doing so intentionally, probably after reading the documentation. This seems like the kind of routine customization that any user might expect to perform without going through the hoop of copying a color map every time.
Proposed fix
Remove the calls to _warn_if_global_cmap_modified(self) in the Colormap.set_bad, set_under, and set_over functions in color.py and change future plans to disallow such calls.
Summary
In v3.4.0rc1, calls to a colormap's
set_bad,set_under, andset_overfunctions now trigger a deprecation warning saying that modifying a registered color map will soon be disallowed. This seems overly protective. If users have called any of these routines, then they are presumably doing so intentionally, probably after reading the documentation. This seems like the kind of routine customization that any user might expect to perform without going through the hoop of copying a color map every time.Proposed fix
Remove the calls to
_warn_if_global_cmap_modified(self)in theColormap.set_bad,set_under, andset_overfunctions incolor.pyand change future plans to disallow such calls.