#NEWLINE# def main( self ) : #NEWLINE# #INDENT# wid = gui . Widget ( width = 320 , height = 320 ) #NEWLINE# wid . style [ 'text-align' ] = 'center' #NEWLINE# bt = gui . Button ( 'Data' , width = 100 , height = 30 ) #NEWLINE# bt . style [ 'margin' ] = '10px' #NEWLINE# bt . set_on_click_listener ( self , 'on_button_pressed' ) #NEWLINE# self . plot_data = [ 0 , 1 ] #NEWLINE# self . mpl = MatplotImage ( width = 250 , height = 250 ) #NEWLINE# self . mpl . style [ 'margin' ] = '10px' #NEWLINE# self . mpl . ax . set_title ( 'test' ) #NEWLINE# self . mpl . ax . plot ( self . plot_data ) #NEWLINE# self . mpl . redraw ( ) #NEWLINE# wid . append ( bt ) #NEWLINE# wid . append ( bt . mpl ) #NEWLINE# return wid