Skip to content

Instantly share code, notes, and snippets.

@MortisHuang
Created February 21, 2019 06:10
Show Gist options
  • Save MortisHuang/97c68c8d687f12f5812a0be95717e842 to your computer and use it in GitHub Desktop.
Save MortisHuang/97c68c8d687f12f5812a0be95717e842 to your computer and use it in GitHub Desktop.
from bokeh.plotting import figure, output_file, show
# prepare some data
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
# output to static HTML file
output_file("lines.html", title="line plot example")
# create a new plot with a title and axis labels
p = figure(title="simple line example", x_axis_label='x', y_axis_label='y')
# add a line renderer with legend and line thickness
p.line(x, y, legend="Temp.", line_width=2)
# show the results
show(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment