Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# 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
# Show the plot

This comment has been minimized.

Copy link

@briandtroup briandtroup commented Sep 2, 2018

need to change '@f_flights' to '@flights' in the definition of hover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment