K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
917 stars 123 forks source link

add invisible plot #362

Closed modaresimr closed 1 year ago

modaresimr commented 1 year ago

I want to add some plots but invisible. However, there is no way to do such a thing. I want to mark it as visible in the control panel.

I found a way to mark the plot invisible but when in the control panel I mark it as visible it will not be shown

plt_line = k3d.line(...)
plt_line.visible=False
plot+=plt_line
plot.display()
artur-trzesiok commented 1 year ago

Please check pip install k3d==2.14.3

modaresimr commented 1 year ago

Great thanks for your quick reaction. It works. The only problem is that we need to tik the visible checkbox, then uncheck it, and again tik visible to see the result.

artur-trzesiok commented 1 year ago

Sounds strange. Please check that: https://github.com/K3D-tools/K3D-jupyter/blob/main/HOW-TO.md#check-if-python-and-js-version-of-k3d-match

modaresimr commented 1 year ago

You are right the version was mismatched but now, if a plot is invisible it will not be shown in the control panel :(

artur-trzesiok commented 1 year ago

Please check pip install k3d==2.14.4

modaresimr commented 1 year ago

Sorry for the delay I didn't have access to my Jupyter server. It works perfectly Thank you