Skip to content

Commit efbead9

Browse files
henry2004ystevengj
andauthored
Update deprecated methods (#590)
Co-authored-by: Steven G. Johnson <[email protected]>
1 parent cb34a10 commit efbead9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/colormaps.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ function init_colormaps()
5454

5555
copy!(LinearSegmentedColormap, colorsm."LinearSegmentedColormap")
5656

57-
copy!(cm_get_cmap, haskey(plt, "get_cmap") ? plt."get_cmap" : cm."get_cmap")
58-
copy!(cm_register_cmap, haskey(matplotlib, "colormaps") && haskey(matplotlib."colormaps", "register") ? matplotlib."colormaps"."register" : cm."register_cmap")
57+
copy!(cm_get_cmap, hasproperty(plt, "get_cmap") ? plt."get_cmap" : cm."get_cmap")
58+
copy!(cm_register_cmap, hasproperty(matplotlib, "colormaps") && hasproperty(matplotlib."colormaps", "register") ? matplotlib."colormaps"."register" : cm."register_cmap")
5959

6060
copy!(ScalarMappable, cm."ScalarMappable")
6161
copy!(Normalize01, pycall(colorsm."Normalize",PyAny,vmin=0,vmax=1))

0 commit comments

Comments
 (0)