Skip to content

Commit

Permalink
FIX: Replace removed functions in matplotlib 3.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
niki1423 committed Dec 10, 2024
1 parent 6230463 commit ead7e42
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fau_colors/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import List, Sequence, Tuple

import matplotlib
from matplotlib import cm
from matplotlib.colors import ListedColormap, to_rgb


Expand All @@ -19,15 +18,15 @@ def custom_blend_colormap(colors, steps):
def get_register_func(cmaps):
def register():
for k, v in cmaps._asdict().items():
cm.register_cmap(name=k, cmap=ListedColormap(v))
matplotlib.colormaps.register(name=k, cmap=ListedColormap(v))

return register


def get_unregister_func(cmaps):
def unregister():
for k in cmaps._asdict():
cm.unregister_cmap(name=k)
matplotlib.colormaps.unregister(name=k)

return unregister

Expand Down

0 comments on commit ead7e42

Please sign in to comment.