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