0

following example of https://holoviews.org/user_guide/Gridded_Datasets.html

The following code does not show the last plot with the slider

import numpy as np
import holoviews as hv
from holoviews import opts
hv.extension('matplotlib')

dataset3d = hv.Dataset((range(3), range(5), range(7), np.random.randn(7, 5, 3)),
                       ['x', 'y', 'z'], 'Value')
dataset3d.select(x=1).to(hv.Image, ['y', 'z'])
dataset3d.to(hv.Image, ['y', 'z'], 'Value', ['x'])

edit:

here is my configuration

jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            6.1.2                      py_0    conda-forge
jupyter_console           6.1.0                      py_1    conda-forge
jupyter_core              4.6.3            py37hc8dfbb8_1    conda-forge
jupyterlab                2.0.1                      py_0    conda-forge
jupyterlab_server         1.1.0                      py_0    conda-forge
panel                     0.9.3                      py_0    conda-forge
holoviews                 1.13.1             pyh9f0ad1d_0    conda-forge
Community
  • 1
  • 1
paugam
  • 150
  • 2
  • 12
  • Could you clarify your question, it's not quite clear to me what you're asking. One thing that's definitely going wrong here is that `dataset3d.select(x=1).to(hv.Image, ['y', 'z'])` won't display anything because it's not on the last line of a cell. – philippjfr Apr 02 '20 at 11:53
  • dataset3d.select worked when at the end of a sell, you're right. The next line however does not work. it returns nothing. might be a problem link with my configuration. 1D plots with slider work. For example in [Tabular_Datasets](http://holoviews.org/user_guide/Tabular_Datasets.html) I have all working until the display of obs_hmap. – paugam Apr 02 '20 at 13:22
  • It sounds like a possible version issue. For a minimal reproducible example it's always helpful to report the versions of all relevant libraries, in this case the HoloViews, Jupyter and possible Panel versions would be of great help. – philippjfr Apr 02 '20 at 13:36
  • just added to the initial question. thanks – paugam Apr 02 '20 at 13:42

1 Answers1

1

problem solved.

version for panel and holoviews in the conda-forge channel were the issue. see working configuration below.

jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            6.1.2                      py_0    conda-forge
jupyter_console           6.1.0                      py_1    conda-forge
jupyter_core              4.6.3            py37hc8dfbb8_1    conda-forge
jupyterlab                2.0.1                      py_0    conda-forge
jupyterlab_server         1.1.0                      py_0    conda-forge
holoviews                 1.13.2                     py_0    pyviz
panel                     0.9.4                      py_0    pyviz
paugam
  • 150
  • 2
  • 12