1 |
# Copyright (c) 2003 by Intevation GmbH |
# -*- encoding: iso-8859-1 -*- |
2 |
|
# |
3 |
|
# Copyright (c) 2003-2004 by Intevation GmbH |
4 |
# Authors: |
# Authors: |
5 |
# Jonathan Coles <[email protected]> |
# Jan-Oliver Wagner <[email protected]> (2004) |
6 |
|
# Bernhard Herzog <[email protected]> (2003) |
7 |
|
# Thomas K�ster <[email protected]> (2003) |
8 |
|
# Jonathan Coles <[email protected]> (2003) |
9 |
# |
# |
10 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
11 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
146 |
max = _list[q] |
max = _list[q] |
147 |
|
|
148 |
group = ClassGroupRange(Range((start, min, max, end)), prop) |
group = ClassGroupRange(Range((start, min, max, end)), prop) |
149 |
|
|
150 |
group.SetLabel("%s%% - %s%%" % (round(oldp*100, 2), |
group.SetLabel("%s%% - %s%%" % (round(oldp*100, 2), |
151 |
round(p*100, 2))) |
round(p*100, 2))) |
152 |
oldp = p |
oldp = p |
161 |
def calculate_quantiles(_list, percents, _range): |
def calculate_quantiles(_list, percents, _range): |
162 |
"""Calculate quantiles for the given _list of percents from the |
"""Calculate quantiles for the given _list of percents from the |
163 |
sorted list of values that are in range. |
sorted list of values that are in range. |
164 |
|
|
165 |
This may not actually generate len(percents) quantiles if |
This may not actually generate len(percents) quantiles if |
166 |
many of the values that fall on quantile borders are the same. |
many of the values that fall on quantile borders are the same. |
167 |
|
|
350 |
+ self.prop1.GetLineWidth() |
+ self.prop1.GetLineWidth() |
351 |
newProps.SetLineWidth(int(round(w))) |
newProps.SetLineWidth(int(round(w))) |
352 |
|
|
353 |
|
s = (self.prop2.GetSize() - self.prop1.GetSize()) \ |
354 |
|
* index \ |
355 |
|
+ self.prop1.GetSize() |
356 |
|
newProps.SetSize(int(round(s))) |
357 |
|
|
358 |
return newProps |
return newProps |
359 |
|
|
360 |
def __SetProperty(self, color1, color2, index, setf): |
def __SetProperty(self, color1, color2, index, setf): |