コード例 #1
0
    def _plot(self):
        col_dict = get_column_dict(self.collection, 'i', *self.metric_selector)
        x = col_dict.pop('i')
        self.figure.clf()
        axes = self.figure.add_subplot(111)


        if self.smooth > 0: x, = gaussConv(self.smooth, x )

#        print x
        for label, y  in col_dict.items():
            if self.smooth > 0: y, = gaussConv(self.smooth, y )
#            print y 
            axes.plot(x,y, label=label)
        
        axes.legend(loc='best')
        axes.set_xlabel('iteration')
        self.figure.canvas.draw()
コード例 #2
0
ファイル: viz.py プロジェクト: recursix/spearmint-salad
    def _plot(self):
        col_dict = get_column_dict(self.collection, "i", *self.metric_selector)
        x = col_dict.pop("i")
        self.figure.clf()
        axes = self.figure.add_subplot(111)

        if self.smooth > 0:
            x, = gaussConv(self.smooth, x)

        #        print x
        for label, y in col_dict.items():
            if self.smooth > 0:
                y, = gaussConv(self.smooth, y)
            #            print y
            axes.plot(x, y, label=label)

        axes.legend(loc="best")
        axes.set_xlabel("iteration")
        self.figure.canvas.draw()
コード例 #3
0
def plot_curve(collection, x_key, *y_key_list):

    col_dict = get_column_dict(collection, *((x_key, ) + y_key_list))

    x = col_dict.get(x_key)
    x_, = gaussConv(1, x)

    color_cycle = pp.gca()._get_lines.color_cycle

    for y_key in y_key_list:

        color = color_cycle.next()

        y = col_dict.get(y_key)
        y_, = gaussConv(1, y)
        pp.plot(x, y, '.', color=color, markersize=2)

        pp.plot(x_, y_, '-', label=y_key, color=color)

    pp.xlabel(x_key)
    pp.legend(loc='best')
コード例 #4
0
def plot_curve(collection, x_key, *y_key_list):
    
    col_dict = get_column_dict( collection, * ((x_key, ) + y_key_list)  )
    
    x = col_dict.get(x_key)
    x_, = gaussConv(1,x )
    
    color_cycle = pp.gca()._get_lines.color_cycle

    for y_key in y_key_list:

        color= color_cycle.next()
        
        y = col_dict.get(y_key)
        y_, = gaussConv(1,y )
        pp.plot(x,y,'.', color=color,markersize=2)
        
        pp.plot(x_,y_,'-', label=y_key, color=color)

        
    pp.xlabel(x_key)
    pp.legend(loc='best')
コード例 #5
0
ファイル: mpl_plot.py プロジェクト: recursix/spearmint-salad
    def draw(self):
        if self.paused :
            return 


        self.figure.clf()
        self.axes = self.figure.add_subplot(111)

        for name in self.name_selected:
            x,y,arg_dict = self._plot_dict[name]
            if x is None: x = np.arange(y)
            if self.smooth > 0: 
                x,y = gaussConv(self.smooth, x, y )
                
            res= self.axes.plot(x,y,**arg_dict)
            color= color_converter.to_rgb( res[0].get_color() )
            print color

        if self.figure.canvas is not None:
            self.figure.canvas.draw()