如何在 python 中可视化表示色调、饱和度和明度的三个独立数组?

How to visualize three separate arrays representing hue, saturation, and value in python?

是否可以采用三个单独的数组来表示色调、饱和度和明度并将它们绘制在 python 中?我有两组数据,一组我想用色调和饱和度来表示,另一组我想用值来表示。

我认为这可能是与 imshow (data1) 类似的输出,其中颜色图设置为色调和饱和度随 data2 变化的值。是吗?

imshow 期望 RGB(A) 值:http://matplotlib.org/api/axes_api.html?highlight=imshow#matplotlib.axes.Axes.imshow

但是 color 模块有一个将 HSV 转换为 RGB 的函数:http://matplotlib.org/api/colors_api.html?highlight=hsv#matplotlib.colors.hsv_to_rgb

所以您需要制作一个 MxNx3 数组,将您的 HSV 数据转换为 RGB,然后 imshow

但是 hue 没有生成 RGB 值所需的所有信息——所有三个 HSV 值都会影响所有三个 RGB 值。