Last active
March 19, 2020 14:03
-
-
Save AntonioMarsella/2e776030d3226f5cf26ceb5106c72ade to your computer and use it in GitHub Desktop.
bokeh plotting tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot = figure(tools='box_select, lasso_select') | |
plot.circle(petal_length, sepal_length, selection_color='red', nonselect_fill_alpha=0.2, nonselection_fill_color='grey') | |
#to apport change to the visual appearance | |
from bokeh.models import HoverTool | |
#it doesn't display the tooltips and shows an horizontal line under the mouse position for the inspection | |
hover = HoverTool(tooltips=None, mode='hline') | |
plot = figure(tools[hover, 'crosshair']) | |
plot.circle(x, y, size=15, hover_color='red') | |
####### | |
# import the HoverTool | |
from bokeh.models import HoverTool | |
# Add circle glyphs to figure p | |
p.circle(x, y, size=10, | |
fill_color='grey', alpha=0.1, line_color=None, | |
hover_fill_color='firebrick', hover_alpha=0.5, | |
hover_line_color='white') | |
# Create a HoverTool: hover | |
hover = HoverTool(tooltips=None, mode='vline') | |
p.add_tools(hover) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment