diff --git a/src/colormaps.jl b/src/colormaps.jl index 2bf4fd3..a12079b 100644 --- a/src/colormaps.jl +++ b/src/colormaps.jl @@ -55,7 +55,7 @@ function init_colormaps() copy!(LinearSegmentedColormap, colorsm."LinearSegmentedColormap") copy!(cm_get_cmap, haskey(plt, "get_cmap") ? plt."get_cmap" : cm."get_cmap") - copy!(cm_register_cmap, haskey(matplotlib.colormaps, "register") ? matplotlib.colormaps."register" : cm."register_cmap") + copy!(cm_register_cmap, haskey(matplotlib, "colormaps") && haskey(matplotlib."colormaps", "register") ? matplotlib."colormaps"."register" : cm."register_cmap") copy!(ScalarMappable, cm."ScalarMappable") copy!(Normalize01, pycall(colorsm."Normalize",PyAny,vmin=0,vmax=1))