绘制图像的时候需要选择美化的曲线,网上的图有很多,但是不少颜色的关键字并不支持。
所以还是多参考官方的颜色名表
在这里插入图片描述
参考
https://matplotlib.org/3.1.0/gallery/color/named_colors.html

matplotlib colormaps

类别颜色获取

color_list = plt.cm.tab10(np.linspace(0, 1, 12))

在这里插入图片描述

https://matplotlib.org/stable/tutorials/colors/colormaps.html?highlight=tab10

seaborn palette

类似seaborn可以通过如下代码获得color_list

color_list = sns.color_palette("hls", 8)

http://seaborn.pydata.org/tutorial/color_palettes.html?highlight=color

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐