Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Reference¶
http://
Comments¶
HoloViews.Histogramtakes the output ofnp.histogramas input and generate a histogram plot.
import numpy as np
import holoviews as hv
hv.extension("bokeh")Loading...
Loading...
Loading...
Generate a histogram from a bunch of values.
np.random.seed(1)
data = np.random.randn(10000)
hist = np.histogram(data, 20)
hv.Histogram(hist)Loading...
Multiple histograms on the same plot.
from bokeh.sampledata.autompg import autompg
autompg_ds = hv.Dataset(autompg)%%opts Histogram (alpha=0.9) [width=600]
autompg_ds.hist(dimension='mpg', groupby='cyl', adjoin=False)Loading...
Make Histogram From Frequencies and Edges¶
np.random.seed(1)
data = np.random.randn(10000)
frequencies, edges = np.histogram(data, 20)
print("Values: %s, Edges: %s" % (frequencies.shape[0], edges.shape[0]))
hv.Histogram((edges, frequencies))