Dear all:
I’m still new to Bokeh, I want to use Bokeh to plot some line charts, like this:
import numpy as np
from bokeh.plotting import figure, show, output_file, vplot
x = np.linspace(0, 4*np.pi, 100)
y = np.sin(x)
TOOLS = “pan,wheel_zoom,box_zoom,reset,save,box_select”
p1 = figure(title=“Legend Example”, tools=TOOLS)
p1.circle(x, y, legend=“sin(x)”)
p1.circle(x, 2y, legend="2sin(x)", color=“orange”)
p1.circle(x, 3y, legend="3sin(x)", color=“green”)
p2 = figure(title=“Another Legend Example”, tools=TOOLS)
p2.circle(x, y, legend=“sin(x)”)
p2.line(x, y, legend=“sin(x)”)
p2.line(x, 2y, legend="2sin(x)",
line_dash=(4, 4), line_color=“orange”, line_width=2)
p2.square(x, 3y, legend="3sin(x)", fill_color=None, line_color=“green”)
p2.line(x, 3y, legend="3sin(x)", line_color=“green”)
output_file(“legend.html”, title=“legend.py example”)
show(vplot(p1, p2)) # open a browser
``
and then I find the HTML file, which include
``
Because of 2 files, I can’t see the image in an offline environment.Could I make “bokeh-0.11.1.min.css” & “bokeh-0.11.1.min.js” in my local machine, and output files replace those 2 files to local files automatically.
If it’s feasible ,how can I achieve it.
Thanks in advance!
Shuai Yang