Closed satra closed 6 years ago
any chance you could make a .trk file available to try this out?
@janfreyberg - here you go:
https://www.dropbox.com/s/dbexuhk7fsawvox/streamlines.trk?dl=0
Thanks.
For some reason I can't get it to work - it doesn't work with ipyvolume from pypi but even if I install from your repo with the fix it's throwing errors. I'll wait until your fix is merged and try it out then!
$ wget https://github.com/satra/ipyvolume/archive/enh/line-visibility-control.zip
unzip and cd to the ipyvolume folder
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix ipyvolume
$ jupyter nbextension enable --py --sys-prefix ipyvolume
note these last steps set up ipyvolume in dev mode and requires nodejs. and any jupyter instance needs to be restarted for this to take effect.
I tried following this and am getting:
D-173-250-183-82:~ $jupyter nbextension install --py --symlink --sys-prefix ipyvolume
Traceback (most recent call last):
File "/Users/arokem/anaconda3/bin/jupyter-nbextension", line 11, in <module>
load_entry_point('notebook', 'console_scripts', 'jupyter-nbextension')()
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 900, in start
super(NBExtensionApp, self).start()
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 256, in start
self.subapp.start()
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 678, in start
self.install_extensions()
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 657, in install_extensions
**kwargs
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 211, in install_nbextension_python
m, nbexts = _get_nbextension_metadata(module)
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 1034, in _get_nbextension_metadata
m = import_item(module)
File "/Users/arokem/anaconda3/lib/python3.5/site-packages/traitlets/utils/importstring.py", line 42, in import_item
return __import__(parts[0])
File "/Users/arokem/source/ipyvolume/ipyvolume/__init__.py", line 10, in <module>
from .pylab import *
File "/Users/arokem/source/ipyvolume/ipyvolume/pylab.py", line 362, in <module>
size_selected=1, size=1, connected=True, visible_markers=False,
File "/Users/arokem/source/ipyvolume/ipyvolume/pylab.py", line 25, in _docsubst
f.__doc__ = f.__doc__.format(**_doc_snippets)
KeyError: 'visible_lines'
Any ideas?
@arokem - hold on based on a conversion on ipyvolume i sent some updates that i didn't test. perhaps those are inappropriate. give me a minute to check.
@arokem - try now - you will have to wget the zip file again.
Yep - installing/enabling seems to work now! Thanks!
@janfreyberg, @arokem - this does require ipyvolume master, but it works well now at scale.
once this branch is installed together with ipyvolume master, you can test with:
https://www.dropbox.com/s/oukfh9agca5k9im/streamlines.ipynb?dl=0
https://www.dropbox.com/s/dbexuhk7fsawvox/streamlines.trk?dl=0
@arokem - with this new mechanism, it would not take much work to refactor to draw bundles.
Thanks, will test this ASAP. Any idea yet when the required changes will be released by ipyvolume?
Working great for me, awesome!
Two thoughts I have:
@janfreyberg - thanks for the review. those suggestions are great. whenever i get some time next, i'll add those in together with @arokem's suggestions.
@arokem and @janfreyberg - finally got to this. should have all the pieces in place now.
@arokem and @janfreyberg - any chance this can be reviewed soon.
Did your changes make it upstream to current ipyvolume?
Did your changes make it upstream to current ipyvolume?
yes
added a streamline widget. usage example here: https://nbviewer.jupyter.org/urls/dl.dropbox.com/s/oukfh9agca5k9im/streamlines.ipynb
this requires a few changes to ipyvolume that i will be submitting as a PR shortly.
additional things to consider: