I took the example from the Holoviews website and plotted the following histogram
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))
and obtained the following graph:
This was the associated error output from Jupyter Notebook:
C:\ProgramData\Anaconda3\lib\site-packages\bokeh\models\sources.py:138:
BokehUserWarning: ColumnDataSource's columns must be of the same length.
Current lengths: ('left', 19), ('right', 19), ('top', 21)
"Current lengths: %s" % ", ".join(sorted(str((k, len(v))) for k, v in
data.items())), BokehUserWarning))
Can anyone explain what's happening here? Even after changing the code to
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[:-1], frequencies))
I still get the same wrong graph.