Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cebra/integrations/matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ def compare_models(

# check the color of the traces
if color is None:
cebra_map = plt.get_cmap(cmap)
cebra_map = matplotlib.colormaps.get_cmap(cmap)
colors = matplotlib.colors.ListedColormap(
cebra_map.resampled(n_models)(np.arange(n_models))).colors
else:
Expand Down
2 changes: 1 addition & 1 deletion cebra/integrations/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _define_colorscale(self, cmap: str):
Returns:
colorscale: List of scaled colors to plot the embeddings
"""
colorscale = _convert_cmap2colorscale(matplotlib.cm.get_cmap(cmap))
colorscale = _convert_cmap2colorscale(matplotlib.colormaps.get_cmap(cmap))

return colorscale

Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ install_requires =
scipy
torch>=2.4.0
tqdm
# NOTE(stes): Remove pin once https://github.com/AdaptiveMotorControlLab/CEBRA/issues/240
# is resolved.
matplotlib<3.11
matplotlib
requests

[options.extras_require]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@pytest.mark.parametrize("cmap", ["viridis", "plasma", "inferno", "magma"])
def test_colorscale(cmap):
cmap = matplotlib.cm.get_cmap(cmap)
cmap = matplotlib.colormaps.get_cmap(cmap)
colorscale = cebra_plotly._convert_cmap2colorscale(cmap)
assert isinstance(colorscale, list)

Expand Down
Loading