Created
March 17, 2018 14:37
-
-
Save WillKoehrsen/b01418736856841785ac2b2cfb061f90 to your computer and use it in GitHub Desktop.
This file contains 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
# Create the blank plot | |
p = figure(plot_height = 600, plot_width = 600, | |
title = 'Histogram of Arrival Delays', | |
x_axis_label = 'Delay (min)]', | |
y_axis_label = 'Number of Flights') | |
# Add a quad glyph with source this time | |
p.quad(bottom=0, top='flights', left='left', right='right', source=src, | |
fill_color='red', line_color='black', fill_alpha = 0.75, | |
hover_fill_alpha = 1.0, hover_fill_color = 'navy') | |
# Add a hover tool referring to the formatted columns | |
hover = HoverTool(tooltips = [('Delay', '@f_interval'), | |
('Num of Flights', '@f_flights')]) | |
# Style the plot | |
p = style(p) | |
# Add the hover tool to the graph | |
p.add_tools(hover) | |
# Show the plot | |
show(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
need to change '@f_flights' to '@flights' in the definition of hover.