widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.95k stars 236 forks source link

Cant see anything #399

Open ShuvamGupta opened 3 years ago

ShuvamGupta commented 3 years ago

Hi, I tried the example in Jupyter notebook but I havent get any plot. import ipyvolume V = np.zeros((128,128,128)) # our 3d array

outer box

V[30:-30,30:-30,30:-30] = 0.75 V[35:-35,35:-35,35:-35] = 0.0

inner box

V[50:-50,50:-50,50:-50] = 0.25 V[55:-55,55:-55,55:-55] = 0.0 ipyvolume.quickvolshow(V, level=[0.25, 0.75], opacity=0.03, level_width=0.1, data_min=0, data_max=1)

I am using firefox and python version 3.8.

maartenbreddels commented 3 years ago

Can you try chrome or chromium? And do you get an error message on the firefox console? Also, which version of ipyvolume do you use?

AVarambhia commented 3 years ago

Hello, I seem to have similar issues as well. This happens when I write the figure as a HTML file using ipv.save and then try view it in the browser. My initial hunch seems to be that it is related to unpkg. This issue can be solved by using ipv.save("filename.html",offline=True), but this is not ideal when it comes to sharing the file. Currently exploring methods to append the required .js files within the HTML file as string as a temporary solution.

unpkg

python ipyvolume version: 0.6.0a6