I would like to use some dropdowns, combo-boxes and other complicated combinations of widgets from the ipywidgets library, which I have been developing in a jupyter notebook. However, I am forced to use plotly Dash for deployment. Is there a way I can display ipywidgets in a plotly Dash app without having to convert all of the individual widgets to their dash equivalents?
Related
I use Jupyter notebooks to teach fluid mechanics. It allows me to present students with various forms of media from basic python examples to videos and 3D models.
https://github.com/nolankucd/MEEN20010
Currently I use pyGEL3D to display simple OBJ files and it works reasonably well. The models can be rotated and zoomed etc but there is no support for materials or animation. I can export the notebooks to embedded html and everything works. This is convenient because I can support students with different technical abilities.
I’d like to transition to glTF files created in Blender to avail of animation and material support. I want to keep the solution simple or self contained to keep the simplicity of the material.
I’ve tried a few different approaches. I’ve found pyVista can load the scene but does not support animation and performance can be poor.
Using an iframe I’ve tried a few viewers.
Don McCurdy’s viewer (https://gltf-viewer.donmccurdy.com) works well but I need to manually load local files via drag and drop. I can load a file hosted via CORS but I’d like to load a local file automatically.
from IPython.display import IFrame
model_url = "https://www.khronos.org/assets/gltf/BusterDrone.glb"
IFrame("https://gltf-viewer.donmccurdy.com#kiosk=1&model="+model_url, width=800, height=600)
There is a loader example on threejs.org which works nicely and loads the example files but I’m unsure how to modify it to load a local file.
https://threejs.org/examples/#webgl_loader_gltf
Can anyone help me understand how display a glTF file in Jupyter?
I have intend to embed a long tutorial notebook on my web page, and using Google colab notebook with Gist seems to do what I need. Almost!
The tutorial has multiple parts, and I would love for it to not be split up into multiple notebooks on the backend.
So, is it possible to make my embedded Gist iframe start from a particular cell of the notebook?
That way I could embed it multiple times, but have it start from different cells in different parts of my website, rather than having multiple distinct notebooks.
Thanks!
Is it possible to build Interactive application using Jupyter Notebook?? for example I want to a window frame with two icons for Image and Camera and I want to be call my Ipython program in it.
Yes. The primary way to implement rich interactions in Jupyter is to use
widgets.
https://ipywidgets.readthedocs.io/en/stable/
Please see https://github.com/AaronWatters/jp_proxy_widget for an easy
way to use general interactive Javascript in Jupyter notebook widgets. Also see
https://github.com/AaronWatters/jp_doodle for some components built using proxy widgets that support complex visualizations with mouse interactions and animation.
There are many postings online about trying to make a double range slider
The most common answer I found is to use libqxt. However, going to the website it clearly states it is not maintained due to internal api changes with newer versions of Qt.
Does Qt5 provide any new functionality for this, or is there a longer lasting Qt implementation that provides this functionality without requiring large external libraries?
If Qt Quick is an option, Qt Quick Controls 2 has a RangeSlider (in three different styles). The module has tech preview status in Qt 5.6, but is a proper module in 5.7.
Here's the Default style RangeSlider:
From what I have read there are only two ways to go about getting a double range slider.
Use Qt4
You can use Qt4 and download libqxt. Libqxt already has that feature implemented so it shouldn't be too hard if you know how to use Qt4.
Two sliders on top of one another
http://qt-project.org/doc/qt-4.8/widgets-codeeditor.html
^That doesn't explain how to use double sliders, but it may help you figure out ho to draw two sliders on top of each other.
You can also use that same technique to draw the colors in between the two values.
I can't find anything about how to embed plotting into Qt by using C++. Which component in Qt should be used for plotting?
I want to grasp the thing generated by these lib and display it using Qt.
I have a working example at this blogpost combining embedded R with Qt. I used both SVG and PNG graphs, though the current version only uses SVG.
The repository is here, if you rewind a commit or two you get the version that flips between SVG and PNG (depending on whether a particular can be loaded).
You should be able to use the logic to show plots from either plplot or matplotlib.