pysilcam/plotting.py
def update(self, imc, imbw, times, d50_ts, vd_mean, display):
        '''Update plot data without full replotting for speed'''

        if display==True:
            self.image.set_data(np.uint8(imc))
            self.image_bw.set_data(np.uint8(imbw>0))

        #Show the last 50 D50 values
        self.d50_plot.set_data(range(len(d50_ts[-50:])), d50_ts[-50:])

        norm = np.sum(vd_mean['total'].vd_mean)/100
        self.line.set_data(vd_mean['total'].dias, vd_mean['total'].vd_mean/norm)
#        self.line_oil.set_data(vd_mean['oil'].dias, vd_mean['oil'].vd_mean/norm)
#        self.line_gas.set_data(vd_mean['gas'].dias, vd_mean['gas'].vd_mean/norm)

        #Fast redraw of dynamic figure elements only
        if display==True:
            self.ax[0, 0].draw_artist(self.image)
            self.ax[0, 1].draw_artist(self.image_bw)
        self.ax[1, 0].draw_artist(self.d50_plot)
        self.ax[1, 1].draw_artist(self.line)
        #self.ax[1, 1].draw_artist(self.line_oil)
        #self.ax[1, 1].draw_artist(self.line_gas)
        self.figure.canvas.flush_events()
Update plot data without full replotting for speed
Update plot data without full replotting for speed
Update plot data without full replotting for speed
def update(self, imc, imbw, times, d50_ts, vd_mean, display):
        if display==True:
            self.image.set_data(np.uint8(imc))
            self.image_bw.set_data(np.uint8(imbw>0))
        self.d50_plot.set_data(range(len(d50_ts[-50:])), d50_ts[-50:])
        norm = np.sum(vd_mean['total'].vd_mean)/100
        self.line.set_data(vd_mean['total'].dias, vd_mean['total'].vd_mean/norm)
        if display==True:
            self.ax[0, 0].draw_artist(self.image)
            self.ax[0, 1].draw_artist(self.image_bw)
        self.ax[1, 0].draw_artist(self.d50_plot)
        self.ax[1, 1].draw_artist(self.line)
        self.figure.canvas.flush_events()
def update ( self , imc , imbw , times , d50_ts , vd_mean , display ) : if display == True : self . image . set_data ( np . uint8 ( imc ) ) self . image_bw . set_data ( np . uint8 ( imbw > 0 ) ) self . d50_plot . set_data ( range ( len ( d50_ts [ - 50 : ] ) ) , d50_ts [ - 50 : ] ) norm = np . sum ( vd_mean [ 'total' ] . vd_mean ) / 100 self . line . set_data ( vd_mean [ 'total' ] . dias , vd_mean [ 'total' ] . vd_mean / norm ) if display == True : self . ax [ 0 , 0 ] . draw_artist ( self . image ) self . ax [ 0 , 1 ] . draw_artist ( self . image_bw ) self . ax [ 1 , 0 ] . draw_artist ( self . d50_plot ) self . ax [ 1 , 1 ] . draw_artist ( self . line ) self . figure . canvas . flush_events ( )
Update plot data without full replotting for speed
Update plot data without full replotting for speed
'''Update plot data without full replotting for speed''' #Show the last 50 D50 values #        self.line_oil.set_data(vd_mean['oil'].dias, vd_mean['oil'].vd_mean/norm) #        self.line_gas.set_data(vd_mean['gas'].dias, vd_mean['gas'].vd_mean/norm) #Fast redraw of dynamic figure elements only #self.ax[1, 1].draw_artist(self.line_oil) #self.ax[1, 1].draw_artist(self.line_gas)
self
imc
imbw
times
d50_ts
vd_mean
display