-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Description
Bug report
I've recently found out that built-in colormaps doesn't exactly match the ones shown on the colormap reference.
Here's an example for the viridis colormap :
Last color on the png is #fde724:

Last color of the colormap is #fde725:
In [35]: import matplotlib
...: from pylab import cm
...: colormap = cm.get_cmap("viridis")
...: matplotlib.colors.rgb2hex(colormap(colormap.N-1))
Out[35]: '#fde725'I've tested only one other colormap (jet), and it had the same issue. Is there a reason for it ?
Matplotlib version
- Operating system: Ubuntu 20.04
- Matplotlib version 3.3.0 & 3.4.2
- Matplotlib backend TkAgg
- Python version: 3.8
Reactions are currently unavailable