Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with plot() in Jupyter Lab #187

Closed
ShivendraAgrawal opened this issue Jun 26, 2018 · 7 comments
Closed

Issue with plot() in Jupyter Lab #187

ShivendraAgrawal opened this issue Jun 26, 2018 · 7 comments
Labels

Comments

@ShivendraAgrawal
Copy link

ShivendraAgrawal commented Jun 26, 2018

I know this must be frustrating or I might have done something very stupid but I am not seeing any error message and when I run the plot() function I see

Renderer(camera=PerspectiveCamera(aspect=1.6, fov=90.0, position=(135.3456573486328, 9146.374328613281, 41812.…

HBox(children=(Label(value='Background color:'), ColorPicker(value='black'), Label(value='Point size:'), Float…

instead of the actual render. I tried staring a simple server too.
I am working on Chrome for Ubuntu 16.04 and python 3.5.

@laoreja
Copy link

laoreja commented Jun 27, 2018

Yeah, I met the same problem, but it occurred when I'm using Jupyter Lab, after I switched to Jupyter notebook, the plot works smoothly

@daavoo
Copy link
Owner

daavoo commented Jun 27, 2018

Hola @ShivendraAgrawal , thanks for reporting. I did not try the plot method inside jupyter lab (just jupyter notebook) so there might be an issue there.

Could you try to run the plot inside a jupyter notebook, as @laoreja suggested??

@daavoo daavoo added the Bug label Jun 27, 2018
@daavoo daavoo changed the title Issue with plot() Issue with plot() in Jupyter Lab Jun 27, 2018
@daavoo
Copy link
Owner

daavoo commented Jun 27, 2018

Ok so I can confirm that this is a issue related with jupyter lab and ipywidgets.

I manage to get the PyntCloud.plot working inside jupyter lab, running on Windows and Ubuntu 16.04, by running inside the conda enviroment:

conda install -c conda-forge nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Yey! 💃

@daavoo daavoo closed this as completed Jun 27, 2018
@ShivendraAgrawal
Copy link
Author

ShivendraAgrawal commented Jun 27, 2018

Hola
Thanks for such a quick response and help.
It's working for me now. My data is too sparse to see things properly. But that's something I will have to deal with. 😄

@daavoo
Copy link
Owner

daavoo commented Jun 28, 2018

@ShivendraAgrawal Glad to hear that it works.

Regarding the size of the points, it is automatically computed and limited right now (maybe not in the best way).

However, you can dinamically change the size beyond the limits of the slider (I am assuming that your data is so sparse that you have tried to slide the size to the maximum and you still can't see things properly) as follows:

# Use the return_scene argument to have access to the pythreejs rendered scene
scene = your_cloud.plot(return_scene=True)

Now, in other cell, you could run:

# Get the pythreejs points geometry
points = scene.children[0]
# Adjust the size of the points to a big number.
# You can try other values and change all the times you want.
points.material.size = 10

And the size of the points in the plot should be refreshed.

@ShivendraAgrawal
Copy link
Author

@daavoo Thanks a lot for the suggestions.

@mjaugustin
Copy link

While using in the Jupyter Note book in windows for the visualization ploy lines
I am getting
Renderer(camera=PerspectiveCamera(aspect=1.6, fov=90.0, position=(-7.629394893626795e-09, 5.1860016727447515, …
HBox(children=(Label(value='Point size:'), FloatSlider(value=1.0183748245239257, max=10.183748245239258, step=…
Instead of rendering
and the image comes with cross symbol
Tried different methods not coming the plot
Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants