Ejemplo n.º 1
0
 def clear_plots(self):
     set_date_ticks(self.axes.xaxis, False)
     children = self.axes.get_children()
     for child in children:
         if child.get_gid() is not None:
             if child.get_gid() == 'plot':
                 child.remove()
Ejemplo n.º 2
0
 def clear_plots(self):
     set_date_ticks(self.axes.xaxis, False)
     children = self.axes.get_children()
     for child in children:
         if child.get_gid() is not None:
             if child.get_gid() == 'plot':
                 child.remove()
Ejemplo n.º 3
0
    def __setup_plot(self):
        self.axes = self.figure.add_subplot(111)

        self.axes.set_xlabel("Time")
        self.axes.set_ylabel('Points')

        numFormatter = ScalarFormatter(useOffset=False)
        set_date_ticks(self.axes.xaxis, False)
        self.axes.yaxis.set_major_formatter(numFormatter)
        self.axes.yaxis.set_minor_locator(AutoMinorLocator(10))

        now = time.time()
        self.axes.set_xlim(utc_to_mpl(now), utc_to_mpl(now - 10))
Ejemplo n.º 4
0
    def __setup_plot(self):
        self.axes = self.figure.add_subplot(111)

        self.axes.set_xlabel("Time")
        self.axes.set_ylabel('Points')

        numFormatter = ScalarFormatter(useOffset=False)
        set_date_ticks(self.axes.xaxis, False)
        self.axes.yaxis.set_major_formatter(numFormatter)
        self.axes.yaxis.set_minor_locator(AutoMinorLocator(10))

        now = time.time()
        self.axes.set_xlim(utc_to_mpl(now), utc_to_mpl(now - 10))
Ejemplo n.º 5
0
    def run(self):
        if self.data is None:
            self.parent.threadPlot = None
            return

        total = len(self.data)
        if total > 0:
            self.parent.clear_plots()

            xs = [utc_to_mpl(x) for x in self.data.keys()]
            ys = [len(sweep) for sweep in self.data.values()]

            self.parent.plot = self.axes.plot(xs, ys, 'bo', gid='plot')

            set_date_ticks(self.axes.xaxis)
            self.parent.scale_plot()
            self.parent.redraw_plot()

        self.parent.threadPlot = None
Ejemplo n.º 6
0
    def run(self):
        if self.data is None:
            self.parent.threadPlot = None
            return

        total = len(self.data)
        if total > 0:
            self.parent.clear_plots()

            xs = [utc_to_mpl(x) for x in self.data.keys()]
            ys = [len(sweep) for sweep in self.data.values()]

            self.parent.plot = self.axes.plot(xs, ys, 'bo', gid='plot')

            set_date_ticks(self.axes.xaxis)
            self.parent.scale_plot()
            self.parent.redraw_plot()

        self.parent.threadPlot = None