Created
July 19, 2016 23:22
-
-
Save cbdelavenne/0970fe4ced71e94487094dc971a914ea to your computer and use it in GitHub Desktop.
Sample Plotting with Bokeh
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
import numpy as np | |
from bokeh.plotting import figure, output_file, show | |
output_file('plotting_sample.html') | |
p = figure(plot_width=1200, plot_height=800) | |
y = np.random.uniform(low=40.0, high=120.0, size=(200,)) | |
x = [x for x in range(0, len(y))] # Time (in Seconds) | |
y2 = [60 for _ in range(0, len(y))] | |
p.line(x, y, line_width=2) # The performance line | |
p.line(x, y2, line_width=3, line_color='red') # The death line | |
p.xaxis.axis_label = 'Time (in Seconds)' | |
p.yaxis.axis_label = 'Framerate' | |
show(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment