#2490·vaex

[BUG-REPORT] Compatibility with matplotlib>=3.11

Author: minouHubCreated Sep 24, 2026Updated Sep 24, 2026

Description

The function matplotlib.cm.get_cmap(...) was deprecated in matplotlib 3.7 and has now been removed in matplotlib 3.11, so any vaex plotting call that goes through this code path crashes on matplotlib >= 3.11.

Minimal reproduction

python
import numpy as np
import vaex

df = vaex.from_arrays(x=np.random.normal(size=100_000), y=np.random.normal(size=100_000))
df.viz.heatmap("x", "y", limits="99%")

Suggested fix

Replace matplotlib.cm.get_cmap(name) with matplotlib.colormaps[name] (or matplotlib.colormaps.get_cmap(name).

Environment

  • vaex: vaex-core 4.19.0, vaex-viz 0.5.4, vaex-hdf5 0.15.0
  • matplotlib: reproduces starting at matplotlib >= 3.11 (tested with matplotlib 3.11.2); does not reproduce on matplotlib 3.10.7 (still has the deprecated get_cmap)
  • Python: 3.12.12

Note: I wrote this issue assisted by AI but I understand every line written above and I tested the code on my machine.