Example #1
0
    def _graph_default(self):
        from pychron.graph.time_series_graph import TimeSeriesStreamGraph

        g = TimeSeriesStreamGraph()
        self.graph_builder(g)

        return g
Example #2
0
 def _graph_default(self):
     '''
     '''
     t = TimeSeriesStreamGraph()
     t.new_plot(data_limit=300, scan_delay=SCAN_INTERVAL / 1000.0)
     t.set_y_limits(min_=0, max_=10)
     return t
Example #3
0
    def _graph_factory(self):
        g = TimeSeriesStreamGraph(container_dict=dict(bgcolor='lightgray',
                                                      padding=5))

        n = self.graph_scan_width * 60
        plot = g.new_plot(padding=[55, 5, 5, 50],
                          data_limit=n,
                          xtitle='Time',
                          ytitle='Signal',
                          scale=self.graph_scale,
                          bgcolor='whitesmoke',
                          zoom=True)

        plot.x_grid.visible = False

        for i, det in enumerate(self.detectors):
        #            if not det.active:
            g.new_series(visible=det.active,
                         #                         use_downsampling=False,
                         color=det.color)
            #            print s.use_downsampling
            g.set_series_label(det.name)
            det.series_id = i

        if plot.plots:
            cp = plot.plots[det.name][0]
            dt = DataTool(plot=cp, component=plot,
                          normalize_time=True,
                          use_date_str=False)
            dto = DataToolOverlay(
                component=plot,
                tool=dt)
            plot.tools.append(dt)
            plot.overlays.append(dto)

            #        self.graph_ymax_auto = True
        #        self.graph_ymin_auto = True
        #        p.value_range.low_setting = 'auto'
        #        p.value_range.high_setting = 'auto'
        #        p.value_range.tight_bounds = False

            n = self.graph_scan_width
            n = max(n, 1 / 60.)
            mins = n * 60
            g.data_limits[0] = 1.8 * mins
            #        g.set_x_tracking(mins)

        return g