
Show HN: Ipyvolume: 3D plotting library for the Jupyter/IPython notebook - maartenbreddels
https://github.com/maartenbreddels/ipyvolume
======
cr0sh
I don't have a way right now to try it out, but based on what I can see - it
looks interesting and useful!

Is there a way to look at the docs without installing the package?

NOTE: Just saw you posted the docs link...mustve missed that!

I'd like to see if there is a way to export besides HTML (ie - can I export
the 3D output as a model or something for use in another application or
purpose?)...

~~~
maartenbreddels
No, currently not really an export method. But if you export as html, it is
mostly a bunch of JSON that you could do something with.

------
dbcooper
Great stuff. Volume plots were one of few things from MATLAB that I missed.

~~~
ylem
Thank you for this! I currently use vtk and Mayavi, but this looks extremely
convenient!

~~~
maartenbreddels
You're welcome. It may not do all what they can do, but what it can do, I
tried to make it as convenient as possible.

------
tomrod
Well done! I look forward to looking it over.

~~~
maartenbreddels
Thank you, it's still in its early days, so feedback, PR's and issue reports
are very much welcome.

~~~
cr0sh
Alright - took a look at the docs and have a bit of feedback:

1\. First off - great job! This kind of thing should be part of graphing libs
to begin with (real perspective projection) - most only have orthographic.

2\. But! You should add the ability to switch to orthographic, as it can be
useful for certain plots.

3\. Other plotting types would be useful - I'm not an expert here - basically
everything matplotlib offers:
[http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html](http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html)

4\. Gridlines, labels, legend, titles, etc.

5\. Perhaps an x/y/z gnomen?

6\. A way to pick/point at a datapoint and see the data values that generated
it (perhaps with a way to apply formatting to the information popup?)

Ok - I know it is "early days" and what I've posted is probably things you
have already thought about and are working on. As a first showing, I really
like it. I can see it being useful for a variety of tasks - and again, I am
glad you do the perspective projection instead of only ortho - because
sometimes, you just want to see the data in a more "real world" fashion...

~~~
maartenbreddels
Thank you, I agree on all points, but good to hear this from others. Labels
and axis etc are most important now. What are gnomen?

~~~
cbcoutinho
I think it's a small x/y/z axis next to the plot to guide the eye and give
orientation. Doesn't have to be located at (0,0,0)

~~~
maartenbreddels
Ah yes, thank you, good idea.

------
johnloeber
Great stuff. The lack of surface and volume plotting was one of my perpetual
gripes with matplotlib.

~~~
maartenbreddels
Thanks. Mayavi was always an option. Except for the lack of Python 3 support.
Anyway, more choice is better.

------
gjjrfcbugxbhf
Can this work without ipython (i.e. be embedded in a qt window)?

~~~
maartenbreddels
It can work without in the sense that you can export an html file and open
that in the browser. But there is no 'real' OpenGL support (yet?). However,
it's parent project vaex:
[http://vaex.astro.rug.nl/](http://vaex.astro.rug.nl/) Does do this, but the
volume rendering code needs cleanup, and it does not have an api like this
package has. But it would be possible, the shaders are almost the same, the
techniques are, but I'm not sure if it is worth the effort. So by question
back is, why would you want that?

~~~
gjjrfcbugxbhf
I don't always want to work inside a browser...

------
julienchastang
Any plans for isosurfaces?

~~~
maartenbreddels
Yes, short answer: will happen.

------
madman2890
why not use plotly? More advanced tool and more aesthetically pleasing plots

~~~
maartenbreddels
Fair question. I needed both 3d quiver and volume rendering, like this:
[https://www.astro.rug.nl/~breddels/test/hdz.html](https://www.astro.rug.nl/~breddels/test/hdz.html)
Plotly cannot do that. And this scales to 1 million glyphs, i dont think ploty
can do that either. Aesthetics we disagree on i guess :). Futhermore, it is
build on ipywidgets, which makes interactivity a simple step, and it can be
linked to say bqplot:
[http://ipyvolume.readthedocs.io/en/latest/bqplot.html](http://ipyvolume.readthedocs.io/en/latest/bqplot.html)
So various reasons, thanks for your question.

~~~
eurg
A sideline: stereoscopic rendering:

I always wonder, why are they drawn for divergent view? (right plot: right
eye, left plot, left eye). Convergent view (cross-eye) is much easier for
large (full screen plots).

Swapping both plots, (most) humans can easily see the stereoscopic picture
without any aids, but it's more or less impossible for almost anyone to have a
3D divergent view for 3D plots where the eyes look away (wider angle than
parallel).

So the size limit for divergent view is _much_ smaller than for cross-eyed
view.

It is always great to see 3D plots in actual 3D, while regularly working on a
notebook, and convergent view would make that quick and easy...

~~~
maartenbreddels
I made this with the the Google Cardboard in mind. So you are looking at
stereoscopic rendering without aids? I had no idea that was even possible.

------
baldfat
Seems that the title still might continue the confusion on names. IPython is
the python language kernel and Jupyter is a notebook system that that works
with dozens of languages.

So the graph system works with Python only and not other Jupyter supported
languages.

This graph system works with the iPython kernel inside of Jupyter notebooks.

~~~
maartenbreddels
You are correct mostly, this is a Python package, working in the Jupyter
notebook, it will not work for other languages. However, most people still
know it as the IPython notebook, that is why is mentioned it.

However, most of the code for ipywidgets and ipyvolume is Javascript, running
in the browser (you can even export the snippet to include into an html page)
and porting it to other languages should be possible.

