def get_symbols_for_filts(uf):
# Plot colors
#cc = ['r','g','b','m','k']
# blue to red
cc = [colorsys.hsv_to_rgb(h, 1., 1.)
for h in np.linspace(0.666, 0., len(uf), endpoint=True)]
# normalize
cc = [x / np.sum(x) for x in cc]
# darken green
for x in cc:
x[1] *= 0.7
# Plot symbols
ss = ['*','x','o','^','s']
# filter-to-color and filter-to-symbol maps
fcmap = dict([(f,cc[i%len(cc)]) for i,f in enumerate(uf)])
fsmap = dict([(f,ss[i%len(ss)]) for i,f in enumerate(uf)])
return cc, ss, fcmap, fsmap
评论列表
文章目录