<s> from __future__ import print_function <EOL> from numpy import pi , arange , sin <EOL> from bokeh . util . browser import view <EOL> from bokeh . document import Document <EOL> from bokeh . embed import file_html <EOL> from bokeh . models . glyphs import Circle <EOL> from bokeh . models import ( <EOL> Plot , DataRange1d , LinearAxis , ColumnDataSource , PanTool , WheelZoomTool <EOL> ) <EOL> from bokeh . resources import INLINE <EOL> x = arange ( - <NUM_LIT:2> * pi , <NUM_LIT:2> * pi , <NUM_LIT:0.1> ) <EOL> y = sin ( x ) <EOL> source = ColumnDataSource ( <EOL> data = dict ( x = x , y = y ) <EOL> ) <EOL> xdr = DataRange1d ( ) <EOL> ydr = DataRange1d ( ) <EOL> plot = Plot ( x_range = xdr , y_range = ydr , min_border = <NUM_LIT> ) <EOL> circle = Circle ( x = "<STR_LIT:x>" , y = "<STR_LIT:y>" , fill_color = "<STR_LIT>" , size = <NUM_LIT:5> , line_color = "<STR_LIT>" ) <EOL> plot . add_glyph ( source , circle ) <EOL> plot . add_layout ( LinearAxis ( ) , '<STR_LIT>' ) <EOL> plot . add_layout ( LinearAxis ( ) , '<STR_LIT:left>' ) <EOL> plot . add_tools ( PanTool ( ) , WheelZoomTool ( ) ) <EOL> doc = Document ( ) <EOL> doc . add_root ( plot ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> filename = "<STR_LIT>" <EOL> with open ( filename , "<STR_LIT:w>" ) as f : <EOL> f . write ( file_html ( doc , INLINE , "<STR_LIT>" ) ) <EOL> print ( "<STR_LIT>" % filename ) <EOL> view ( filename ) </s>
