5 from array
import array
6 from pprint
import pprint
11 """Set a color palette from a given RGB list 12 stops, red, green and blue should all be lists of the same length 13 see set_decent_colors for an example""" 15 if name ==
"gray" or name ==
"grayscale":
16 stops = [0.00, 0.34, 0.61, 0.84, 1.00]
17 red = [1.00, 0.84, 0.61, 0.34, 0.00]
18 green = [1.00, 0.84, 0.61, 0.34, 0.00]
19 blue = [1.00, 0.84, 0.61, 0.34, 0.00]
23 stops = [0.00, 0.34, 0.61, 0.84, 1.00]
24 red = [0.50, 0.50, 1.00, 1.00, 1.00]
25 green = [ 0.50, 1.00, 1.00, 0.60, 0.50]
26 blue = [1.00, 1.00, 0.50, 0.40, 0.50]
30 stops = [0.00, 0.34, 0.61, 0.84, 1.00]
31 red = [0.00, 0.00, 0.87, 1.00, 0.51]
32 green = [0.00, 0.81, 1.00, 0.20, 0.00]
33 blue = [0.51, 1.00, 0.12, 0.00, 0.00]
41 ROOT.TColor.CreateGradientColorTable(npoints, s, r, g, b, ncontours)
42 ROOT.gStyle.SetNumberContours(ncontours)
def set_palette(name="palette", ncontours=999)