diff python/indicators.py @ 408:365d8dee44f3

last changes for TRB14
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 13 Aug 2013 23:36:45 -0400
parents 6d26dcc7bba0
children eb8baa080470
line wrap: on
line diff
--- a/python/indicators.py	Mon Aug 12 22:50:42 2013 -0400
+++ b/python/indicators.py	Tue Aug 13 23:36:45 2013 -0400
@@ -74,14 +74,14 @@
     def getValues(self):
         return [self.__getitem__(t) for t in self.timeInterval]
 
-    def plot(self, options = '', xfactor = 1., timeShift = 0, **kwargs):
+    def plot(self, options = '', xfactor = 1., yfactor = 1., timeShift = 0, **kwargs):
         from matplotlib.pylab import plot,ylim
         if self.getTimeInterval().length() == 1:
             marker = 'o'
         else:
             marker = ''
         time = sorted(self.values.keys())
-        plot([(x+timeShift)/xfactor for x in time], [self.values[i] for i in time], options+marker, **kwargs)
+        plot([(x+timeShift)/xfactor for x in time], [self.values[i]/yfactor for i in time], options+marker, **kwargs)
         if self.maxValue:
             ylim(ymax = self.maxValue)