Live data from Hacker News

Bokeh – a Python interactive visualization library

bokeh.pydata.org

41–50 of 67 posts

Re: Bokeh – a Python interactive visualization library

#41
post #10

Since I have never really liked Matplotlib I would really like to learn Bokeh, but unfortunately its inability to export its visualizations in SVG or similar formats makes it kind of useless for me as a scientist wanting to publish my results.

But hey, you can save your work in a xkcd style: to_bokeh(fig=None, use_pandas=True, xkcd=False) Taken from: http://bokeh.pydata.org/en/latest/docs/user_guide/compat.htm...

But hey, you can already do that with Matplotlib ;)

http://matplotlib.org/xkcd/examples/showcase/xkcd.html

Re: Bokeh – a Python interactive visualization library

#42
post #40

Ruby is so behind in this... :/ The closest thing I could find, which is only just a proposed enhancement in a github project, is considering adding ploty.js to Flammarion (a new Ruby GUI toolkit using the browser as working window), or maybe Ruby Processing to some extent?

Actually, we'd LOVE to get a bokeh.rb project going! Most of the power of Bokeh is in the BokehJS runtime, and in our M-VM-V-C architecture for visualization. The Python code is just generating a JSON representation of the plot, but it's relatively straightforward to do that from any language. You can see front-end implementations in other languages:

* R: https://github.com/bokeh/rbokeh * Scala: https://github.com/bokeh/bokeh-scala * Julia: https://github.com/bokeh/Bokeh.jl

The Facebook data science folks even implemented a small Bokeh wrapper in Lua, as part of their iTorch package: https://github.com/facebook/iTorch/blob/master/Plot.lua

So, you can see that you can get started with a basic wrapper, and then build up from there. The Lua wrapper is only ~850 lines. If you want to pop over to the mailing list or on our Github, we'd love to help you out.

Re: Bokeh – a Python interactive visualization library

#43
post #38
post #35

Earlier quoted context omitted.

It still has limited resolution and a much higher storage footprint. Plotting charts is the vector graphics use case par excellence. Having svg support is a no brainer.

Of course you're right that we do need to support SVG and vector formats, but it's also not entirely true that "vector >> raster" in all cases. Raster does have limited resolution, but so does your screen or most output devices (yes, even scientific plotters). It's also not necessarily true that it has a higher storage footprint; it depends on the complexity and number of glyphs, the fonts you need to embed for the L…

That's true, in practical uses a sufficiently high res raster is indistinguishable from a vector image. Still, it would be nice to have that option.

Re: Bokeh – a Python interactive visualization library

#44
post #34

"Bokeh is a Python interactive visualization library that targets modern web browsers for presentation." A description of how one gets from Python to a web browser display would be nice. Is there a translation from Python to Javascript somewhere? Is there a Python web server backend? Are there dynamic visual updates or does this thing just generate a static output like a .png file?

There is a full-featured javascript runtime "BokehJS" which is designed from the ground up to be driven by remote (aka server-side) models, which are sent over the wire as JSON. The server-side models are generated programmatically via Python, R, Scala, etc. The cool thing is that a lot of the interactivity is completely native in BokehJS, so you can build interactive Javascript visualizations from Python , and have…

Are the visualizations downloaded at page load only, or can they be readily fashioned with websockets, etc to turn them into an interactive dashboard?

I've been considering running out lab experiments off of a webapp, but haven't found an easy enough solution.

Re: Bokeh – a Python interactive visualization library

#45
post #23
post #9

Earlier quoted context omitted.

They're working on it, probably in a month or two you'll be able to do it: https://groups.google.com/a/continuum.io/forum/#!searchin/bo... At the current time you can export to png, or maybe export to svg in a roundabout manner, by turning html page into pdf, turning pdf into svg, etc.

Working on SVG? What about EPS instead? For scientific publishing EPS is much better unless your visualisation is pretty much an high entropy one.

Please explain why EPS is better.

Re: Bokeh – a Python interactive visualization library

#46

Earlier quoted context omitted.

Bokeh can be used with both Python 2.7 and Python 3. Additional dependencies are needed to work with Python 2.7. In fact, the "write call-back functions in Python" capability uses a Python to JS compiler called Flexx -- http://flexx.readthedocs.org/en/latest/flexjs . Flexx is currently Python 3 only (though 2.7 support is coming for it).

thx @travisoliphant the requirements are not clear in the docs. This explanation makes more sense.

Thanks for the feedback. We keep a continuous and frequent effort to make documentation more efficient and straightforward .. Building clear is a constant/endless effort and feedback is very important.

To clarify, Futures is required for bokeh server as an extra dependency on Python 2.7 since it's not a battery included like for Python > 3.2.. if you conda install Bokeh it should be installed already for you. You can find more info about the bokeh server features here: http://bokeh.pydata.org/en/latest/docs/user_guide/server.htm... and here: http://bokeh.pydata.org/en/latest/docs/user_guide/cli.html#m...

Flexx, on other hand, is not required by bokeh server itself but instead to define python functions to handle interactivity that runs on the browser (no need of bokeh server). Flexx is used to convert python to JS. You can find more info here: http://bokeh.pydata.org/en/latest/docs/user_guide/interactio...

Re: Bokeh – a Python interactive visualization library

#47

Earlier quoted context omitted.

Bokeh can be used with both Python 2.7 and Python 3. Additional dependencies are needed to work with Python 2.7. In fact, the "write call-back functions in Python" capability uses a Python to JS compiler called Flexx -- http://flexx.readthedocs.org/en/latest/flexjs . Flexx is currently Python 3 only (though 2.7 support is coming for it).

thx @travisoliphant the requirements are not clear in the docs. This explanation makes more sense.

Also forgot to mention that Flexx support for Python 2.7 should be available soon.. :)

Re: Bokeh – a Python interactive visualization library

#48
post #23

Earlier quoted context omitted.

Working on SVG? What about EPS instead? For scientific publishing EPS is much better unless your visualisation is pretty much an high entropy one.

Please explain why EPS is better.

Most imaging for offset printing is done in PostScript, which can render EPS directly, so there's no format conversion. For web publishing that's not the case, and either is probably fine depending on the workflow.

Re: Bokeh – a Python interactive visualization library

#49
post #36
post #30

Earlier quoted context omitted.

bokeh by definition is talking about the out of focus stuff, which is arguably the less important part of a shot.

Which brings in focus elements into sharper attention.

And a photo that is entirely bokeh?

http://i.imgur.com/siLB9C3.jpg

Re: Bokeh – a Python interactive visualization library

#50
post #16

Since I have never really liked Matplotlib I would really like to learn Bokeh, but unfortunately its inability to export its visualizations in SVG or similar formats makes it kind of useless for me as a scientist wanting to publish my results.

If you're not wedded to Python, have a gander at Gnuplot. Despite its quirks, it's my favorite plotting tool.

I severely dislike Gnuplot, but then again, I am wedded to Python. I'm not sure how versatile it is, at least from the slightly acquainted position I am.
Post reply on HN