Guest User

Untitled

a guest
Jan 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. source = ColumnDataSource(data=dict(
  2. x=[1,2,3,4,5,6],
  3. y=[2,2,4,5,6,7],
  4. desc=['type1', 'type1', 'type2','type2','type1','type1'],
  5. fill_color=['green','grey','grey','red','red','red'],
  6. #fill_alpha=0.6,
  7. #line_color=None
  8. ))
  9.  
  10. TOOLTIPS = [
  11. ("index", "$index"),
  12. ("(x,y)", "($x, $y)"),
  13. ("desc", "@desc"),
  14. ("fill_color", "@fill_color")]
  15.  
  16. p = figure(tools=TOOLS, plot_width=1000, tooltips=TOOLTIPS)
  17. p.scatter(x='x',y='y', source=source)
  18. output_file("color_scatter.html", title="color_scatter.py example")
  19. show(p) # open a browser
Add Comment
Please, Sign In to add comment