##// END OF EJS Templates
Fix plotting bug
Juan C. Espinoza -
r1214:9d8b5d03f906
parent child
Show More
@@ -463,7 +463,6 class Plot(Operation):
463 463 datetime.datetime(1970, 1, 1)).total_seconds()
464 464 if self.data.localtime:
465 465 xmin += time.timezone
466 self.tmin = xmin
467 466 else:
468 467 xmin = self.xmin
469 468
@@ -563,7 +562,7 class Plot(Operation):
563 562 ax.set_title('{} {} {}'.format(
564 563 self.titles[n],
565 564 self.getDateTime(self.data.max_time).strftime(
566 '%H:%M:%S'),
565 '%Y-%m-%d %H:%M:%S'),
567 566 self.time_label),
568 567 size=8)
569 568 else:
@@ -738,6 +737,17 class Plot(Operation):
738 737
739 738 if self.isConfig is False:
740 739 self.__setup(**kwargs)
740 if dataOut.type == 'Parameters':
741 self.tmin = dataOut.utctimeInit
742 else:
743 self.tmin = dataOut.utctime
744
745 if dataOut.useLocalTime:
746 if not self.localtime:
747 self.tmin += time.timezone
748 else:
749 if self.localtime:
750 self.tmin -= time.timezone
741 751 self.data.setup()
742 752 self.isConfig = True
743 753 if self.plot_server:
@@ -751,16 +761,21 class Plot(Operation):
751 761 tm = dataOut.utctimeInit
752 762 else:
753 763 tm = dataOut.utctime
754
764
755 765 if dataOut.useLocalTime:
756 766 if not self.localtime:
757 767 tm += time.timezone
758 768 else:
759 769 if self.localtime:
760 770 tm -= time.timezone
761
762 if self.xaxis is 'time' and self.data and (tm - self.tmin) >= self.xrange*60*60:
771
772 if self.xaxis is 'time' and self.data and (tm - self.tmin) >= self.xrange*60*60:
773 self.save_counter = self.save_period
763 774 self.__plot()
775 self.xmin += self.xrange
776 if self.xmin >= 24:
777 self.xmin -= 24
778 self.tmin += self.xrange*60*60
764 779 self.data.setup()
765 780 self.clear_figures()
766 781
@@ -775,10 +790,13 class Plot(Operation):
775 790 else:
776 791 self.__throttle_plot(self.__plot, coerce=coerce)
777 792
778 figpause(0.001)
793 figpause(0.01)
779 794
780 795 def close(self):
781 796
797 if self.data:
798 self.save_counter = self.save_period
799 self.__plot()
782 800 if self.data and self.pause:
783 801 figpause(10)
784 802
General Comments 0
You need to be logged in to leave comments. Login now