Skip to content

Commit

Permalink
check for matplotlibs.colormaps before matplotlibs.colormaps.register
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Jul 5, 2024
1 parent aff0598 commit bd9e8a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/colormaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit bd9e8a8

Please sign in to comment.