|
|
@ -1,4 +1,7 @@ |
|
|
|
#!/usr/bin/env python |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"plot.py" |
|
|
|
|
|
|
|
|
|
|
|
import sys |
|
|
|
import sys |
|
|
|
from itertools import izip, count, chain |
|
|
|
from itertools import izip, count, chain |
|
|
|
from lxml import etree |
|
|
|
from lxml import etree |
|
|
@ -173,6 +176,8 @@ class Plot(Graph): |
|
|
|
# above is same as |
|
|
|
# above is same as |
|
|
|
#max_value = max(map(lambda set: max(set['data'][data_index]), self.data)) |
|
|
|
#max_value = max(map(lambda set: max(set['data'][data_index]), self.data)) |
|
|
|
spec_max = getattr(self, 'max_%s_value' % axis) |
|
|
|
spec_max = getattr(self, 'max_%s_value' % axis) |
|
|
|
|
|
|
|
# Python 3 doesn't allow comparing None to int, so use -∞ |
|
|
|
|
|
|
|
if spec_max is None: spec_max = float('-Inf') |
|
|
|
max_value = max(max_value, spec_max) |
|
|
|
max_value = max(max_value, spec_max) |
|
|
|
return max_value |
|
|
|
return max_value |
|
|
|
|
|
|
|
|
|
|
|