34 |
clazz = Classification() |
clazz = Classification() |
35 |
|
|
36 |
i = 0 |
i = 0 |
37 |
|
maxValue = float(len(_list) - 1) |
38 |
for value in _list: |
for value in _list: |
39 |
prop = ramp.GetProperties(float(i) / len(_list)) |
prop = ramp.GetProperties(i / maxValue) |
40 |
clazz.AppendGroup(ClassGroupSingleton(value, prop)) |
clazz.AppendGroup(ClassGroupSingleton(value, prop)) |
41 |
i += 1 |
i += 1 |
42 |
|
|
57 |
cur_min = min |
cur_min = min |
58 |
|
|
59 |
end = "[" |
end = "[" |
60 |
|
maxValue = float(numGroups - 1) |
61 |
for i in range(1, numGroups + 1): |
for i in range(1, numGroups + 1): |
62 |
|
|
63 |
prop = ramp.GetProperties(float(i-1) / numGroups) |
prop = ramp.GetProperties(float(i-1) / maxValue) |
64 |
|
|
65 |
if intStep: |
if intStep: |
66 |
cur_max = min + int(round((i * (max - min + 1)) / float(numGroups))) |
cur_max = min + int(round((i * (max - min + 1)) / maxValue)) |
67 |
else: |
else: |
68 |
cur_max = min + (i * (max - min)) / float(numGroups) |
cur_max = min + (i * (max - min)) / maxValue |
69 |
|
|
70 |
if i == numGroups: |
if i == numGroups: |
71 |
cur_max = max |
cur_max = max |
124 |
i = 1 |
i = 1 |
125 |
end = "]" |
end = "]" |
126 |
|
|
127 |
|
maxValue = float(numGroups - 1) |
128 |
for (q, p) in quantiles[3]: |
for (q, p) in quantiles[3]: |
129 |
|
|
130 |
prop = ramp.GetProperties(float(i-1) / numGroups) |
prop = ramp.GetProperties(float(i-1) / maxValue) |
131 |
|
|
132 |
if i == numGroups: |
if i == numGroups: |
133 |
max = endMax |
max = endMax |
188 |
i = 1 |
i = 1 |
189 |
end = "]" |
end = "]" |
190 |
|
|
191 |
|
maxValue = float(numGroups - 1) |
192 |
for (q, p) in quantiles[3][1:]: |
for (q, p) in quantiles[3][1:]: |
193 |
prop = ramp.GetProperties(float(i) / numGroups) |
prop = ramp.GetProperties(float(i-1) / maxValue) |
194 |
|
|
195 |
if i == numGroups: |
if i == numGroups: |
196 |
max = endMax |
max = endMax |