##// END OF EJS Templates
ajusta el xmin del grafico segun el timerange
Daniel Valdez -
r412:e44fad45bd9f
parent child
Show More
@@ -55,14 +55,20 class Figure:
55 55
56 56 def getTimeLim(self, x, xmin, xmax):
57 57
58 if self.timerange != None:
59 txmin = x[0] - x[0]%self.timerange
60 else:
61 txmin = numpy.min(x)
62
58 63 thisdatetime = datetime.datetime.utcfromtimestamp(numpy.min(x))
59 64 thisdate = datetime.datetime.combine(thisdatetime.date(), datetime.time(0,0,0))
60 65
61 66 ####################################################
62 67 #If the x is out of xrange
63 if xmax < (thisdatetime - thisdate).seconds/(60*60.):
64 xmin = None
65 xmax = None
68 if xmax != None:
69 if xmax < (thisdatetime - thisdate).seconds/(60*60.):
70 xmin = None
71 xmax = None
66 72
67 73 if xmin == None:
68 74 td = thisdatetime - thisdate
General Comments 0
You need to be logged in to leave comments. Login now