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.
Bokeh – a Python interactive visualization library
31–40 of 67 posts
Re: Bokeh – a Python interactive visualization library
#32Earlier 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.
A png isn't a vector format, so the important property of the SVG (or EPS, PDF) is lost. A vectorized bitmap is still a bitmap.
Re: Bokeh – a Python interactive visualization library
#33Since 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.
That being said, this sounds nice for adding interactivity (sliders to vary parameters, that sort of stuff). Useful in presentations and the sort.
Re: Bokeh – a Python interactive visualization library
#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?
See, for instance, Sarah Bird's excellent GapMinder example: http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blo...
When you move the slider, it generates JS events which drive model updates completely in the browser, which then update the objects that comprise the plot. All of that is built straight from Python, but there is no Python kernel running in the background.
Bokeh also lets you write your event handlers in Python, and reside on the server, and get called back automatically when the user interacts with the plot in some way. Check out this app for example: http://demo.bokehplots.com/apps/selection_histogram You can use the lasso tool to select some points, and that computes a new sub-histogram. Here is the entirety of the code for it: https://github.com/bokeh/bokeh/blob/master/examples/app/sele...
For more deep-dive on the architecture, you can start at this slide and walk through: http://www.slideshare.net/misterwang/bokeh-tutorial-pydata-s...
Or you can watch this webinar recording (start at the 19 minute mark): https://continuum-analytics.wistia.com/medias/f6wp9dam91
Re: Bokeh – a Python interactive visualization library
#35Earlier quoted context omitted.
A png isn't a vector format, so the important property of the SVG (or EPS, PDF) is lost. A vectorized bitmap is still a bitmap.
What resolution are you looking for in print? If you export your raster at 300 dpi, and enable lossless PNG compression, shouldn't it suffice for most print purposes?
Re: Bokeh – a Python interactive visualization library
#36Earlier quoted context omitted.
i believe the idea behind the name is that bokeh (python) is to data viz what bokeh is to photography - its a tool that brings the important data into focus.....
bokeh by definition is talking about the out of focus stuff, which is arguably the less important part of a shot.
Re: Bokeh – a Python interactive visualization library
#37"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?
my question exactly. What does this do that I can't do with highcharts?
http://bokeh.pydata.org/en/latest/docs/dev_guide/bokehjs.htm...
Re: Bokeh – a Python interactive visualization library
#38Earlier quoted context omitted.
What resolution are you looking for in print? If you export your raster at 300 dpi, and enable lossless PNG compression, shouldn't it suffice for most print purposes?
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.
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 LaTeX formulae, etc. etc. In large-data cases, raster can be a much more viable visualization transfer medium.
Re: Bokeh – a Python interactive visualization library
#39Strange name, it refers to the way a camera lens blurs out-of-focus objects (especially highlights) into a disc shape [1]. I was expecting an image processing library. Bokeh is widely discussed by photography equipment aficionados as one of the main distinguishing traits of different lens designs besides sharpness, distortion, etc. edit: maybe it is an allusion to bubble plots? [1] https://www.google.com/search?q=bok…
A very large part of the vision is that we want to support accurate and useful visualization on large datasets. This is now encapsulated in the Datashader library (although it plays well with Bokeh itself): https://github.com/bokeh/datashader
If you are interested in this, we just did a webinar this week on Datashader, and demonstrate how to easily visualize billions of points through the browser, in a few seconds, on a single machine: https://continuum-analytics.wistia.com/medias/8zu9idwoym?mkt...