#NEWLINE# def redraw( self ) : #NEWLINE# #INDENT# canv = FigureCanvasAgg ( self . _fig ) #NEWLINE# buf = io . BytesIO ( ) #NEWLINE# canv . print_figure ( buf , format = 'png' ) #NEWLINE# with self . _buflock : #NEWLINE# #INDENT# if ( self . _buf is not None ) : #NEWLINE# #INDENT# self . _buf . close ( ) #NEWLINE# #UNINDENT# self . _buf = buf #NEWLINE# #UNINDENT# i = int ( ( time . time ( ) * 1000000.0 ) ) #NEWLINE# self . attributes [ 'src' ] = ( '/%s/get_image_data?update_index=%d' % ( id ( self ) , i ) ) #NEWLINE# super ( MatplotImage , self ) . redraw ( )