diff --git a/src/colormaps.jl b/src/colormaps.jl index 6fc6cf4..d53e9ea 100644 --- a/src/colormaps.jl +++ b/src/colormaps.jl @@ -49,7 +49,7 @@ function init_colormaps() PythonCall.pycopy!(LinearSegmentedColormap, colorsm.LinearSegmentedColormap) PythonCall.pycopy!(cm_get_cmap, pyhasattr(pyplot, "get_cmap") ? pyplot.get_cmap : cm.get_cmap) - PythonCall.pycopy!(cm_register_cmap, pyhasattr(matplotlib.colormaps, "register") ? matplotlib.colormaps.register : cm.register_cmap) + PythonCall.pycopy!(cm_register_cmap, pyhasattr(matplotlib, "colormaps") && pyhasattr(matplotlib.colormaps, "register") ? matplotlib.colormaps.register : cm.register_cmap) PythonCall.pycopy!(ScalarMappable, cm.ScalarMappable) PythonCall.pycopy!(Normalize01, pycall(colorsm.Normalize; vmin=0,vmax=1))