Closed stuarteberg closed 3 months ago
Thank you for the issue.
This is a limitation in Bokeh, https://github.com/bokeh/bokeh/issues/6536 and is also tracked in HoloViews here.
@hoxbro Thanks for the response. I'm happy to close this if it's truly a duplicate of the two issues you linked to.
I'm confused, though: Those issues pertain to data with at least one empty bin. In my case, there are no empty bins, so the minimum y-value should be non-negative, even after taking the log.
In [12]: data = [1, 1, 2, 2, 2, 3, 3, 3]
...: y = np.histogram(data, bins=[1,2,4])[0]
...: np.log(y)
Out[12]: array([0.69314718, 1.79175947])
The zero referred to is the bottom of the rectangles used for the histogram bars, not the empty space between bars.
Ah, I see. So it's not the y-values that matter... that would be the top of the bars. But every bar has the same bottom position, and it's 0 for all of them.
Thanks for the clarification. Closing this.
Please don't close this issue until it will not fixed! Now hvplot.hist(..., logy=True) is still broken.
Hi @ampilnick, I'm -1 on re-opening this issue as it is already tracked in https://github.com/holoviz/holoviews/issues/2591 and https://github.com/bokeh/bokeh/issues/6536. I have added the hvplot
label to https://github.com/holoviz/holoviews/issues/2591 to let the maintainers know that this also affects hvPlot.
The
hvplot.hist()
function cannot be used with thelogy
option, even when all bins are populated and therefore ought to have non-infinite log values.ALL software version info
relevant package versions
``` $ conda list | grep -E 'python|numpy|^pandas|bokeh|holo|hvplot|jupyter' bokeh 3.4.1 pyhd8ed1ab_0 conda-forge brotli-python 1.1.0 py312h30efb56_1 conda-forge holoviews 1.18.3 pyhd8ed1ab_0 conda-forge hvplot 0.10.0 pyhd8ed1ab_0 conda-forge ipython 8.24.0 pyh707e725_0 conda-forge jupyter-lsp 2.2.5 pyhd8ed1ab_0 conda-forge jupyter_bokeh 4.0.4 pyhd8ed1ab_0 conda-forge jupyter_client 8.6.2 pyhd8ed1ab_0 conda-forge jupyter_core 5.7.2 py312h7900ff3_0 conda-forge jupyter_events 0.10.0 pyhd8ed1ab_0 conda-forge jupyter_server 2.14.0 pyhd8ed1ab_0 conda-forge jupyter_server_terminals 0.5.3 pyhd8ed1ab_0 conda-forge jupyterlab 4.2.1 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge jupyterlab_server 2.27.2 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 3.0.11 pyhd8ed1ab_0 conda-forge libboost-python 1.82.0 py312hfb10629_6 conda-forge libboost-python-devel 1.82.0 py312h8da182e_6 conda-forge msgpack-python 1.0.8 py312h2492b07_0 conda-forge neuprint-python 0.4.26+8.gd487a3c dev_0conda info
``` $ conda info active environment : flyem-312 active env location : /groups/flyem/proj/cluster/miniforge/envs/flyem-312 shell level : 1 user config file : /groups/flyem/home/bergs/.condarc populated config files : /groups/flyem/proj/cluster/miniforge/.condarc conda version : 24.5.0 conda-build version : 24.3.0 python version : 3.8.13.final.0 solver : libmamba (default) virtual packages : __archspec=1=sapphirerapids __conda=24.5.0=0 __glibc=2.34=0 __linux=5.14.0=0 __unix=0=0 base environment : /groups/flyem/proj/cluster/miniforge (writable) conda av data dir : /groups/flyem/proj/cluster/miniforge/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/flyem-forge/linux-64 https://conda.anaconda.org/flyem-forge/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch package cache : /groups/flyem/proj/cluster/miniforge/pkgs /groups/flyem/home/bergs/.conda/pkgs envs directories : /groups/flyem/proj/cluster/miniforge/envs /groups/flyem/home/bergs/.conda/envs platform : linux-64 user-agent : conda/24.5.0 requests/2.28.1 CPython/3.8.13 Linux/5.14.0-362.8.1.el9_3.x86_64 rocky/9.3 glibc/2.34 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8 UID:GID : 50328:93098 netrc file : None offline mode : False ```Description of expected behavior and the observed behavior
When using
logy=True
, no bars are shown, and a warning is given. (See below.)Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
Screenshots or screencasts of the bug in action