Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import numpy as np
  2. from bokeh.plotting import figure, show
  3. from bokeh.io import output_notebook
  4. from bokeh.models import ColumnDataSource
  5. # Direct output to this notebook
  6. output_notebook()
  7.  
  8. n = 100
  9. x = np.random.random(size=n) * 100
  10. y = np.random.random(size=n) * 100
  11. source = ColumnDataSource(data=dict(x=x, y=y))
  12.  
  13. figkwds = dict(plot_width=400, plot_height=300, webgl=True,
  14. tools="pan,lasso_select,box_select,help",
  15. active_drag="lasso_select")
  16.  
  17. p1 = figure(**figkwds)
  18. p1.scatter('x', 'y', source=source, alpha=0.8)
  19.  
  20. show(p1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement