From efbead954ae3a1301fa5e5da5d3302a6b782f2f3 Mon Sep 17 00:00:00 2001 From: Hongyang Zhou Date: Sat, 6 Jul 2024 08:52:31 -0400 Subject: [PATCH] Update deprecated methods (#590) Co-authored-by: Steven G. Johnson --- src/colormaps.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/colormaps.jl b/src/colormaps.jl index a12079b..4a2ccdc 100644 --- a/src/colormaps.jl +++ b/src/colormaps.jl @@ -54,8 +54,8 @@ 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") && haskey(matplotlib."colormaps", "register") ? matplotlib."colormaps"."register" : cm."register_cmap") + copy!(cm_get_cmap, hasproperty(plt, "get_cmap") ? plt."get_cmap" : cm."get_cmap") + copy!(cm_register_cmap, hasproperty(matplotlib, "colormaps") && hasproperty(matplotlib."colormaps", "register") ? matplotlib."colormaps"."register" : cm."register_cmap") copy!(ScalarMappable, cm."ScalarMappable") copy!(Normalize01, pycall(colorsm."Normalize",PyAny,vmin=0,vmax=1))