Hello community,
Trying to utilize the hvplot API to crate a panel dashboard and want to create a histogram but relying on numpy.histogram_bin_edges; auto or fd but getting an error when changing the backend from matplotlib to holoviews.
Hope you can point me in the right direction.
Here the toy example:
x = np.linspace(norm.ppf(0.01),
norm.ppf(0.99), 100)
df_toy = pd.DataFrame(x,columns=['x'])
df_toy.describe()
df_toy['y'] = norm.pdf(df_toy['x'],df_toy['x'].mean(),df_toy['x'].std())
df_toy['x'].plot(kind='hist',bins='fd')
The error I got is:
TypeError: bins
must be an integer, a string, or an array
If I utilize matplotlib works fine if using ‘fd’. With auto I got:
ValueError: shape mismatch: objects cannot be broadcast to a single shape
but if I create the chart using:
plt.hist(df_toy['x'],bins='auto')
That works fine with auto.