Hacker News new | comments | show | ask | jobs | submit login
Show HN: Ipyvolume: 3D plotting library for the Jupyter/IPython notebook (github.com)
210 points by maartenbreddels on Feb 17, 2017 | hide | past | web | favorite | 29 comments

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?)...

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.

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

Thank you. As I mention in the documentation: http://ipyvolume.readthedocs.io/en/latest/ There are other packages available for Python, but I would argue they are more difficult to get working (either installation or more boilerplate code)

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

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.

Well done! I look forward to looking it over.

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

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

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...

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?

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)

Ah yes, thank you, good idea.

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

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

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

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/ 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?

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

Any plans for isosurfaces?

Yes, short answer: will happen.

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

Fair question. I needed both 3d quiver and volume rendering, like this: 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 So various reasons, thanks for your question.

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...

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.

And not free.

I used to use them, but stopped once I exceeded the free usage limit.

It was free to use on your personal computer, but I wanted to post the plots on my blog. Also, at the time, using them in the notebook had the same effect as posting it on a blog (in terms of their usage limits). I ran out just playing with Plotly.

I think they should make it free for non-commercial use...

I thought they open-sourced it a while back (early last year or so)? Was this before that, or is there some catch to it?

There is a completely offline version available, and it's free.

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.

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.

I find the title quite clear (was it changed?). It reads "Jupyter/IPython" at the moment which made me correctly assume that this would be something to use with IPython in Jupyter.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact