Skip to content Skip to sidebar Skip to footer

Cannot Plot Histogram On Ubuntu 14.04

I'm using Python 2.7 and Bokeh 0.12.4 on Ubuntu 14.04. I have a data frame like so: msrp price compact 1.0 1.0 sedan 2.0 3.0 suv 3.0 5.0 sport 4.

Solution 1:

The old bokeh.charts API, including Histogram was deprecated and subsequently removed. To create histograms with Bokeh, you should use the bokeh.plotting API. There are a variety of ways that could work, here is one complete example, created with Bokeh 0.13:

import numpy as np
from bokeh.plotting import figure, show

measured = np.random.normal(0, 0.5, 1000)
hist, edge = np.histogram(measured, density=True, bins=50)

p = figure()
p.quad(top=hist, bottom=0, left=edge[:-1], right=edge[1:], line_color="white")

show(p)

enter image description here

Post a Comment for "Cannot Plot Histogram On Ubuntu 14.04"