Export plots to svg image files

Like others, I’m using Bokeh to both visualize/interact with data and to then export final plots into reports for publishing. It is required to submit the images as SVG files and not just PNG (many academic journals require this). I know this feature has been discussed, and I have been following the updates here: https://github.com/bokeh/bokeh/issues/538

@birdsarah created a work around that exports plots successfully as SVG here: https://github.com/bokeh/bokeh/pull/3867

I would really like to install this older branch of Bokeh from GitHub in order to make use of this feature until it’s implemented into a release, however installing it via pip either gives me errors or freezes and doesn’t make any progress for over 30 minutes. I’ve read that it should install fairly easily within a few minutes. Does anyone have experience with this? I’m using the following command to try and install this commit (on a Mac running 64-bit Python v2.7.1 through Enthought Canopy) https://github.com/bokeh/bokeh/pull/3867/commits/10671b772205a427041ba4299722301206a136eb :

pip install git+https://github.com/bokeh/bokeh@10671b772205a427041ba4299722301206a136eb

Downloading the zip file from GitHub and trying to install it via pip also leads to the terminal freezing with no progress. Have others been able to install and use this work around? Are there other workarounds to get SVGs from Bokeh plots?

Thanks for your thoughts!

I’ve been having an issue with my lasso tool. It’s super jumpy and barely responsive, and instead of making a selection by following my mouse as in examples, it makes a bunch of triangles (which fail to select the data I’m trying to capture)

I’m currently building a data dashboard using bokeh server.

Does this sound like a common problem to anybody? Does anybody have a good solution?

···

Sophie

Sophie Wagner
[email protected]

402-990-3119

Hi,

···

On Mon, Aug 8, 2016 at 3:35 PM, Sophie Wagner [email protected] wrote:

I’ve been having an issue with my lasso tool. It’s super jumpy and barely responsive, and instead of making a selection by following my mouse as in examples, it makes a bunch of triangles (which fail to select the data I’m trying to capture)

I’m currently building a data dashboard using bokeh server.

Does this sound like a common problem to anybody? Does anybody have a good solution?

you may want to try setting select_every_mousemove=False on LassoTool. This way you will avoid constant round trips with partial selections between a browser and bokeh server. If this doesn’t help, then the plot may be too big for lasso tool in its current, inefficient form. Switching to a webgl backend (webgl=True on a Figure or Plot) may help with this, but the effect depends on glyphs in use. It could be also a bug, but it’s hard to say at this point.

Mateusz

Sophie

Sophie Wagner
[email protected]

402-990-3119

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAG2tKvQ4ut8soVNag%2BMtKr1Zf4Az4C7GNKO9y1haH4Q7q07H7g%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks! switching to False on select_every_mousemove really did the trick. I’m also going to check out switching to webgl and see if that helps out more as well.

···

On Mon, Aug 8, 2016 at 3:35 PM, Sophie Wagner [email protected] wrote:

I’ve been having an issue with my lasso tool. It’s super jumpy and barely responsive, and instead of making a selection by following my mouse as in examples, it makes a bunch of triangles (which fail to select the data I’m trying to capture)

I’m currently building a data dashboard using bokeh server.

Does this sound like a common problem to anybody? Does anybody have a good solution?

you may want to try setting select_every_mousemove=False on LassoTool. This way you will avoid constant round trips with partial selections between a browser and bokeh server. If this doesn’t help, then the plot may be too big for lasso tool in its current, inefficient form. Switching to a webgl backend (webgl=True on a Figure or Plot) may help with this, but the effect depends on glyphs in use. It could be also a bug, but it’s hard to say at this point.

Mateusz

Sophie

Sophie Wagner
[email protected]

402-990-3119

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAG2tKvQ4ut8soVNag%2BMtKr1Zf4Az4C7GNKO9y1haH4Q7q07H7g%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I would suggest following the developer
in structions and get a working
copy of master built and running

From there you should
be able to just check out my branch, rebuild and use it.

···

http://bokeh.pydata.org/en/latest/docs/dev_guide.html
On 8/8/16 1:27 AM, wrote:

[email protected]

    Like others, I'm using Bokeh to both

visualize/interact with data and to then export final plots into
reports for publishing. It is required to submit the images as
SVG files and not just PNG (many academic journals require
this). I know this feature has been discussed, and I have been
following the updates here: https://github.com/bokeh/bokeh/issues/538

    @birdsarah created a work around that exports plots successfully

as SVG here: https://github.com/bokeh/bokeh/pull/3867

    I would really like to install this older branch of Bokeh from

GitHub in order to make use of this feature until it’s
implemented into a release, however installing it via pip either
gives me errors or freezes and doesn’t make any progress for
over 30 minutes. I’ve read that it should install fairly easily
within a few minutes. Does anyone have experience with this? I’m
using the following command to try and install this commit (on a
Mac running 64-bit Python v2.7.1 through Enthought Canopy) https://github.com/bokeh/bokeh/pull/3867/commits/10671b772205a427041ba4299722301206a136eb
:

    pip install

git+https://github.com/bokeh/bokeh@10671b772205a427041ba4299722301206a136eb

    Downloading the zip file from GitHub and trying to install it

via pip also leads to the terminal freezing with no progress.
Have others been able to install and use this work around? Are
there other workarounds to get SVGs from Bokeh plots?

    Thanks for your thoughts!

  You received this message because you are subscribed to the Google

Groups “Bokeh Discussion - Public” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

  To post to this group, send email to [email protected].

  To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/809c67e9-50f5-494d-8d14-525628f72896%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/809c67e9-50f5-494d-8d14-525628f72896%40continuum.io?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

Sarah had advice for building from master, but I wanted to comment specifically on this quoted above. This is never going to work. :slight_smile: Bokeh is multi-language project, with a complicated build. In particular, the BokehJS library has to be "compiled" from coffeescript (and some typescript). Before this, lots of JS libraries have to be installed with "npm".The setup.py does not capture the "npm" step (it typically has to be run once, by hand). The automatically generated tarballs on GitHub do not capture the build step either, and are basically useless. If I could find a way to delete the tarballs but keep the tag, I would.

The *only* reliable ways to install Bokeh:

* "conda install" or "pip install" published full releases, RCs, or dev builds

* build from GitHub checkout according to dev guide instructions

Bryan

···

On Aug 8, 2016, at 3:27 AM, [email protected] wrote:

pip install git+https://github.com/bokeh/bokeh@10671b772205a427041ba4299722301206a136eb

Downloading the zip file from GitHub and trying to install it via pip also leads to the terminal freezing with no progress. Have others been able to install and use this work around? Are there other workarounds to get SVGs from Bokeh plots?

Hi Sophie,

Originally thought this was just a server performance issue / too many updates on every mouse move. But an accidental discovery seems to indicate that the lasso tool is just broken on non-cricle glyphs. Can you take a look at:

  Lasso select is broken with non-circle markers · Issue #4936 · bokeh/bokeh · GitHub

And confirm if thats also what you were seeing?

Thanks,

Bryan

···

On Aug 8, 2016, at 8:35 AM, Sophie Wagner <[email protected]> wrote:

I've been having an issue with my lasso tool. It's super jumpy and barely responsive, and instead of making a selection by following my mouse as in examples, it makes a bunch of triangles (which fail to select the data I'm trying to capture)

I'm currently building a data dashboard using bokeh server.

Does this sound like a common problem to anybody? Does anybody have a good solution?

-

Sophie
--
Sophie Wagner
[email protected]
402-990-3119

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAG2tKvQ4ut8soVNag%2BMtKr1Zf4Az4C7GNKO9y1haH4Q7q07H7g%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan,

The visual matches what my lasso ended up looking like previous. I am using segment, scatter, circle, and x glyphs on my graph, and since switching on_every_mousemove off I’ve seen greatly improved performance and the problem is seemingly resolved. It seems to play nicely with all the the circle, x, and scatter glyphs, but not the segments which it doesn’t affect.

···

On Tue, Aug 9, 2016 at 11:15 AM Bryan Van de Ven [email protected] wrote:

Hi Sophie,

Originally thought this was just a server performance issue / too many updates on every mouse move. But an accidental discovery seems to indicate that the lasso tool is just broken on non-cricle glyphs. Can you take a look at:

    [https://github.com/bokeh/bokeh/issues/4936](https://github.com/bokeh/bokeh/issues/4936)

And confirm if thats also what you were seeing?

Thanks,

Bryan

On Aug 8, 2016, at 8:35 AM, Sophie Wagner [email protected] wrote:

I’ve been having an issue with my lasso tool. It’s super jumpy and barely responsive, and instead of making a selection by following my mouse as in examples, it makes a bunch of triangles (which fail to select the data I’m trying to capture)

I’m currently building a data dashboard using bokeh server.

Does this sound like a common problem to anybody? Does anybody have a good solution?

Sophie

Sophie Wagner

[email protected]

402-990-3119

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAG2tKvQ4ut8soVNag%2BMtKr1Zf4Az4C7GNKO9y1haH4Q7q07H7g%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/3D0247A7-E37D-4394-BC07-72F4352A79B0%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Sophie Wagner
[email protected]