matplotlib的默认颜色图为viridis
a = np.arange(6).reshape(2,3)
aimg = plt.imshow(a)
渲染图像(图_1)
aimg.cmap.name
输出
'viridis'
这不是普通的英语。
根据此post
拉丁语中“绿色”一词是绿色的。
但是Figure_1看起来比绿色更彩色。
matplotlib中的viridis一词是什么来的?
答案 0 :(得分:2)
源代码显示:
Matplotlib ships with 4 perceptually uniform color maps which are
the recommended color maps for sequential data:
========= ===================================================
Colormap Description
========= ===================================================
inferno perceptually uniform shades of black-red-yellow
magma perceptually uniform shades of black-red-white
plasma perceptually uniform shades of blue-red-yellow
viridis perceptually uniform shades of blue-green-yellow
========= ===================================================
我也发现了这一点
要了解色彩理论以及如何生成“ viridis”,请观看Nathaniel Smith和Stéfanvan der Walt在SciPy2015上的演讲
这里是that talk