legend
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import colorsys
|
||||
|
||||
lbstoN = 4.44822
|
||||
|
||||
def range_to_color_hex(groupcols):
|
||||
rgb = [colorsys.hsv_to_rgb((207-4*x)/360.,
|
||||
0.06+0.89*x,
|
||||
1-0.38*x) for x in groupcols]
|
||||
|
||||
RGB = [(int(255.*r),int(255.*g),int(255.*b)) for (r, g, b) in rgb]
|
||||
colors = ["#%02x%02x%02x" % (r, g, b) for (r, g, b) in RGB]
|
||||
|
||||
return colors
|
||||
|
||||
def str2bool(v):
|
||||
return v.lower() in ("yes", "true", "t", "1")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user