#NEWLINE# @ react . connect ( 'amp.value' , 'freq.value' , 'phase.value' ) #NEWLINE# def _update_sine( self , amp , freq , phase ) : #NEWLINE# #INDENT# glyph = None #NEWLINE# plot = self . plot2 . plot ( ) #NEWLINE# if plot : #NEWLINE# #INDENT# for ren in plot . renderers . values ( ) : #NEWLINE# #INDENT# if ren . glyph : #NEWLINE# #INDENT# glyph = ren . glyph #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if glyph : #NEWLINE# #INDENT# glyph . y = [ ( amp * Math . sin ( ( ( x * freq ) + phase ) ) ) for x in glyph . x ] #NEWLINE# plot . render ( )