Example #1
0
    def plot_fits(self):
        """
        Function called to plot the regression fits.
        """
        components = []

        for component in self.container.components:
            components.append(component)

        for component in components:
            self.container.components.remove(component)

        plotdata = ArrayPlotData(x=self.index, y=self.Y)
        plot = Plot(plotdata)
        plot.plot(("x", "y"), type="line", color="red")
        plot.line_style = "dash"
        self.container.add(plot)

        plotdata = ArrayPlotData(x=self.index, y=self.selection_olsfit)
        plot = Plot(plotdata)
        plot.plot(("x", "y"), type="line", color="blue")
        self.container.add(plot)

        self.container.request_redraw()
Example #2
0
    def plot_fits(self):
        '''
        Function called to plot the regression fits.
        '''
        components = []

        for component in self.container.components:
            components.append(component)

        for component in components:
            self.container.components.remove(component)

        plotdata = ArrayPlotData(x=self.index, y=self.Y)
        plot = Plot(plotdata)
        plot.plot(("x", "y"), type='line', color='red')
        plot.line_style = 'dash'
        self.container.add(plot)

        plotdata = ArrayPlotData(x=self.index, y=self.selection_olsfit)
        plot = Plot(plotdata)
        plot.plot(("x", "y"), type='line', color='blue')
        self.container.add(plot)

        self.container.request_redraw()