'bins' keyword argument ignored in histogram
See original GitHub issueHi,
It seems like setting the number of bins through the bins keyword argument in histograms does nothing.
Let’s take an example in the Holoviews demos:
import holoviews as hv
from holoviews import opts
hv.extension('bokeh')
from bokeh.sampledata.autompg import autompg
autompg_ds = hv.Dataset(autompg)
hist = autompg_ds.hist(dimension='mpg', groupby='cyl', bin_range=(9, 46), bins=40, adjoin=False)
hist.opts(opts.Histogram(alpha=0.9, width=600))
Setting bins to 40 or 10 or 100 does not change the output. Note that I encounter the same behavior when using histogram() from holoviews.operation.element.
Or maybe I’m getting something wrong?
Config:
- Holoviews 1.13.4
- Jupyter notebook with bokeh backend
- Python 3.8
- Browser: Chromium / Firefox
- OS: CentOS 7
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Cannot get histogram to show separated bins with vertical lines
Using your example: import numpy as np import matplotlib.pyplot as plt x = np.random.rand((100)) bins = np.linspace(0, 2, ...
Read more >matplotlib.pyplot.hist — Matplotlib 3.1.2 documentation
Deprecated ; use the density keyword argument instead. Returns: n : array or list of arrays. The values of the histogram bins. See ......
Read more >Matplotlib.pyplot.hist() in Python - GeeksforGeeks
It uses the density keyword argument instead. Returns: This returns the following: n :This returns the values of the histogram bins. bins ......
Read more >pandas.Series.plot.hist — pandas 1.5.2 documentation
Number of histogram bins to be used. **kwargs. Additional keyword arguments are documented in DataFrame.plot() . Returns. class: matplotlib.AxesSubplot.
Read more >hist function - RDocumentation
Arguments · x. a vector of values for which the histogram is desired. · breaks. one of: · freq · probability · include....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was surprised too, but it’s actually a long-standing issue with
ParamOverrides
https://github.com/holoviz/param/issues/85The command to use is
num_bins
. Sorry for the late answer.