matplotlib中的viridis(用于颜色图)一词来自何处?

时间:2019-06-11 00:23:09

标签: python matplotlib

matplotlib的默认颜色图为viridis

a = np.arange(6).reshape(2,3)
aimg = plt.imshow(a)

渲染图像(图_1)

enter image description here

aimg.cmap.name

输出

'viridis'

这不是普通的英语。

根据此post

  

拉丁语中“绿色”一词是绿色的。

但是Figure_1看起来比绿色更彩色。

matplotlib中的viridis一词是什么来的?

1 个答案:

答案 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