daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.39k stars 221 forks source link

plot() isn't interactive in jupyter notebook #275

Closed ziliHarvey closed 4 years ago

ziliHarvey commented 4 years ago

Screenshot from 2020-03-06 15-07-49

Using plot in .py file generates a gui with points in 3d that can be dragged, manipulated by mouse. However, in Jupyter Notebook, only static image is shown. Can anyone help me with this?

daavoo commented 4 years ago

Hola @ziliHarvey . It looks like you are plotting with the matplotlib backend.

In order to make the plot interactive you can either:

A) Invoke the %matplotlib notebook magic command before calling the plot (More info at https://medium.com/@1522933668924/using-matplotlib-in-jupyter-notebooks-comparing-methods-and-some-tips-python-c38e85b40ba1)

B) Use the pythreejs backend, by passing the argument to plot:

pc.plot(backend="pythreejs", initial_point_size=0.02)

Feel free to re-open if the issue persists after aplying the proposed solutions