<s> import numpy as np <EOL> from bokeh . io import vplot <EOL> from bokeh . plotting import figure , show , output_file <EOL> from bokeh . models . sources import ColumnDataSource <EOL> from bokeh . models import CustomJS , Button , Label <EOL> from bokeh . models . transforms import Jitter <EOL> N = <NUM_LIT:1000> <EOL> source = ColumnDataSource ( data = dict ( <EOL> x = np . ones ( N ) , xn = <NUM_LIT:2> * np . ones ( N ) , xu = <NUM_LIT:3> * np . ones ( N ) , y = np . random . random ( N ) * <NUM_LIT:10> <EOL> ) ) <EOL> normal = Jitter ( width = <NUM_LIT> , distribution = "<STR_LIT>" ) <EOL> uniform = Jitter ( width = <NUM_LIT> , distribution = "<STR_LIT>" ) <EOL> p = figure ( x_range = ( <NUM_LIT:0> , <NUM_LIT:4> ) , y_range = ( <NUM_LIT:0> , <NUM_LIT:10> ) ) <EOL> p . circle ( x = '<STR_LIT:x>' , y = '<STR_LIT:y>' , color = '<STR_LIT>' , source = source , size = <NUM_LIT:5> , alpha = <NUM_LIT:0.5> ) <EOL> p . circle ( x = '<STR_LIT>' , y = '<STR_LIT:y>' , color = '<STR_LIT>' , source = source , size = <NUM_LIT:5> , alpha = <NUM_LIT:0.5> ) <EOL> p . circle ( x = '<STR_LIT>' , y = '<STR_LIT:y>' , color = '<STR_LIT>' , source = source , size = <NUM_LIT:5> , alpha = <NUM_LIT:0.5> ) <EOL> label_data = ColumnDataSource ( data = dict ( <EOL> x = [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] , y = [ <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:10> ] , t = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ) ) <EOL> labels = Label ( x = '<STR_LIT:x>' , y = '<STR_LIT:y>' , text = '<STR_LIT:t>' , y_offset = <NUM_LIT:2> , source = label_data , render_mode = '<STR_LIT>' , text_align = '<STR_LIT>' ) <EOL> p . add_annotation ( labels ) <EOL> callback = CustomJS ( args = dict ( source = source , normal = normal , uniform = uniform ) , code = """<STR_LIT>""" ) <EOL> button = Button ( label = '<STR_LIT>' , callback = callback ) <EOL> output_file ( "<STR_LIT>" , title = "<STR_LIT>" ) <EOL> show ( vplot ( button , p ) ) </s>
