Hi, I’m traying to do a histogram, using histogram.py, but cant find or dont know where to insert my data.csv to see results. I dont eaven know from where is the data of that example comming from. can any one please help me on this?
If you look at the code they generate a histrogram with np.histogram, then pass that to the quad functions (see Quad). In the documentation they use a ColumnDataSource, but in histogram.py they effectively do,
# myapp.py
import numpy as np
from bokeh.plotting import figure, curdoc
mu, sigma = 0, 0.5
# Here is the data
measured = np.random.normal(mu, sigma, 1000)
hist, edges = np.histogram(measured, density=True, bins=50)
p = figure(title=title, tools='', background_fill_color="#fafafa")
p.quad(top=hist, bottom=0, left=edges[:-1], right=edges[1:],
fill_color="navy", line_color="white", alpha=0.5)
curdoc().add_root(p)