Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- from bokeh.plotting import figure, show
- from bokeh.io import output_notebook
- from bokeh.models import ColumnDataSource
- # Direct output to this notebook
- output_notebook()
- n = 100
- x = np.random.random(size=n) * 100
- y = np.random.random(size=n) * 100
- source = ColumnDataSource(data=dict(x=x, y=y))
- figkwds = dict(plot_width=400, plot_height=300, webgl=True,
- tools="pan,lasso_select,box_select,help",
- active_drag="lasso_select")
- p1 = figure(**figkwds)
- p1.scatter('x', 'y', source=source, alpha=0.8)
- show(p1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement