- 积分
- 2127
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-6-12
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2013-10-11 21:02:57
|
显示全部楼层
本帖最后由 lon91ong 于 2013-11-1 10:14 编辑
顺便分享一个Matplotlib colormaps教程: http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps
文中的这一段看不太懂,希望英语好的大侠帮忙翻译一下:
- First, create a script that will map the range (0,1) to values in the RGB spectrum. In this dictionary, you will have a series of tuples for each color 'red', 'green', and 'blue'. The first elements in each of these color series needs to be ordered from 0 to 1, with arbitrary spacing inbetween. Now, consider (0.5, 1.0, 0.7) in the 'red' series below. This tuple says that at 0.5 in the range from (0,1) , interpolate from below to 1.0, and above from 0.7. Often, the second two values in each tuple will be the same, but using diferent values is helpful for putting breaks in your colormap.
复制代码 另外一个参考似乎更明白一些:http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap
|
|