I use Jupyter Notebook to make analysis of datasets. There are a lot of plots in the notebook, and some of them are 3d plots.
I'm wondering if it is possible to make the 3d plot interactive, so I can later play with it in more details?
Maybe we can add a button on it? Clicking it can pop out a 3d plot and people can zoom, pan, rotate etc.
My thougths:
This does not fit my case, because I need to continue plot after the 3d plot. %qt
will interfere with later plots.
mpld3
is almost ideal in my case, no need to rewrite anything, compatible with matplotlib. However, it only support 2D plot. And I didn't see any plan working on 3D (https://github.com/mpld3/mpld3/issues/223).
Didn't find any actualy example of 3d plot in bokeh
gallery. I only find https://demo.bokeh.org/surface3d, which uses visjs
.
Since what I need is just line and surce, is it possible to pass the data to js plot using js in the browser to make it interacive? (Then we may need to add 3d axis as well.) This may be similar to visjs
, and mpld3
.
Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn't specialized for any specific problems.
Python is widely considered among the easiest programming languages for beginners to learn. If you're interested in learning a programming language, Python is a good place to start. It's also one of the most widely used.
PyCharm, a proprietary and Open Source IDE for Python development. PyScripter, Free and open-source software Python IDE for Microsoft Windows. PythonAnywhere, an online IDE and Web hosting service. Python Tools for Visual Studio, Free and open-source plug-in for Visual Studio.
Python is an open-sourcing programming language. Therefore, it is freely available for everyone to access, download, and execute. There are no licensing costs involved with Python.
try:
%matplotlib notebook
see jakevdp reply here
EDIT for JupyterLab users:
Follow the instructions to install jupyter-matplotlib
Then the magic command above is no longer needed, as in the example:
# Enabling the `widget` backend. # This requires jupyter-matplotlib a.k.a. ipympl. # ipympl can be install via pip or conda. %matplotlib widget # aka import ipympl import matplotlib.pyplot as plt plt.plot([0, 1, 2, 2]) plt.show()
Finally, note Maarten Breddels' reply; IMHO ipyvolume is indeed very impressive (and useful!).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With