Multiple independent plots dynamically updated graphs, how to make it faster?

Hello,

I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.

I’ve got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

When you execute it (python run_multiple_plots.py 4) with bokeh-server running you’ll see the number of plots you asked with the generated data plotting.

The problem is… it’s slow.

The line:

cursession().store_objects(myplot[‘data_source’])

Takes a while to execute.

Also, even with only one plot, if I give a fast update rate (I modify the plotting data every… say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.

So my questions are:

  1. How can I make faster showing multiple plots?

  2. How can I make faster the refresh rate of the plots?

I have little idea of web world but I’m quite familiar with Python.

P.S.: Sorry for the repost, now I know fasten has nothing to do with “fast”.

Hi Sam,

Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don't think we have have added an "upate" or "patch" to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.

Bryan

···

On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer <[email protected]> wrote:

Hello,

I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.

I've got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py
When you execute it (python run_multiple_plots.py 4) with bokeh-server running you'll see the number of plots you asked with the generated data plotting.

The problem is... it's slow.

The line:

cursession().store_objects(myplot['data_source'])

Takes a while to execute.

Also, even with only one plot, if I give a fast update rate (I modify the plotting data every... say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.

So my questions are:

1) How can I make faster showing multiple plots?
2) How can I make faster the refresh rate of the plots?

I have little idea of web world but I'm quite familiar with Python.

P.S.: Sorry for the repost, now I know fasten has nothing to do with "fast".

--
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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

The real case is:

I have a humanoid robot that has maaany motors. Let’s say between 36 and 48. All of them are spitting out position, velocity, acceleration, force, goal position, error in position, and maybe more stuff. At 50Hz.

First of all I would like to be able to plot these 6 plots referring to a motor at the same page. As real time as possible.

Then I would like to plot a subsection of them, all the motors that form an arm (7) and some plots of them, maybe just position. Ideally I’ll try to make this dynamic, like… choose the group, and choose what you want to see. Well, that’s kind of another problem probably.

I would like to update the plot at every cycle I have new data (so, 50Hz, not necessarily at the same time for all the graphs… but that’s not a requisite). At every update I’m just adding/replacing one element of the graph (popping the oldest one and adding the new one on the other side of the list of data). I tried using a very big buffer for the data (100.000 samples) and bokeh-server didn’t like it much.

I can generate dynamically the plots I want from the available data (depending on the robot there are a different quantity of motors and data available in them).

So, yeah, I would like to have 6 plots updating at 50Hz their data synchronously (to make it easier?).

Help! haha

P.S.: Thank you very much for your attention. Once this works it will be something very cool to show.

···

2014-12-01 18:24 GMT+01:00 Bryan Van de Ven [email protected]:

Hi Sam,

Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don’t think we have have added an “upate” or “patch” to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.

Bryan

On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer [email protected] wrote:

Hello,

I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.

I’ve got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

When you execute it (python run_multiple_plots.py 4) with bokeh-server running you’ll see the number of plots you asked with the generated data plotting.

The problem is… it’s slow.

The line:

cursession().store_objects(myplot[‘data_source’])

Takes a while to execute.

Also, even with only one plot, if I give a fast update rate (I modify the plotting data every… say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.

So my questions are:

  1. How can I make faster showing multiple plots?
  1. How can I make faster the refresh rate of the plots?

I have little idea of web world but I’m quite familiar with Python.

P.S.: Sorry for the repost, now I know fasten has nothing to do with “fast”.

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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.

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

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.

To unsubscribe from this group and all its topics, 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/900AFF12-627A-4914-A1AE-8EB97D067B99%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Sam,

This is really cool! If there is anything about this that we can ultimately tweet/vine/showcase in a user gallery, please let us know. (Of course if it is not obliquely releasable that is perfectly understandable.)

This is suddenly a topic of interest so I will definitely make sure it is prioritized for the next dev build after 0.7 release. As I mentioned I don't think it should be too much work to add a new REST call or two that takes just new data to append and can also patch the client data sources via web sockets. I would like to say that it could be in a few weeks but with the holidays coming up a more reasonable conservative estimate would be early January. I have created an issue on our GH issue tracker that you can use to follow or contribute to the discussion and progress:

  https://github.com/bokeh/bokeh/issues/1481

Thanks,

Bryan

···

On Dec 1, 2014, at 12:18 PM, Sam Pfeiffer <[email protected]> wrote:

The real case is:

I have a humanoid robot that has maaany motors. Let's say between 36 and 48. All of them are spitting out position, velocity, acceleration, force, goal position, error in position, and maybe more stuff. At 50Hz.

First of all I would like to be able to plot these 6 plots referring to a motor at the same page. As real time as possible.

Then I would like to plot a subsection of them, all the motors that form an arm (7) and some plots of them, maybe just position. Ideally I'll try to make this dynamic, like... choose the group, and choose what you want to see. Well, that's kind of another problem probably.

I would like to update the plot at every cycle I have new data (so, 50Hz, not necessarily at the same time for all the graphs... but that's not a requisite). At every update I'm just adding/replacing one element of the graph (popping the oldest one and adding the new one on the other side of the list of data). I tried using a very big buffer for the data (100.000 samples) and bokeh-server didn't like it much.

I can generate dynamically the plots I want from the available data (depending on the robot there are a different quantity of motors and data available in them).

So, yeah, I would like to have 6 plots updating at 50Hz their data synchronously (to make it easier?).

Help! haha

P.S.: Thank you very much for your attention. Once this works it will be something very cool to show.

2014-12-01 18:24 GMT+01:00 Bryan Van de Ven <[email protected]>:
Hi Sam,

Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don't think we have have added an "upate" or "patch" to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.

Bryan

> On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer <[email protected]> wrote:
>
> Hello,
>
> I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.
>
> I've got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py
> When you execute it (python run_multiple_plots.py 4) with bokeh-server running you'll see the number of plots you asked with the generated data plotting.
>
> The problem is... it's slow.
>
> The line:
>
> cursession().store_objects(myplot['data_source'])
>
> Takes a while to execute.
>
> Also, even with only one plot, if I give a fast update rate (I modify the plotting data every... say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.
>
> So my questions are:
>
> 1) How can I make faster showing multiple plots?
> 2) How can I make faster the refresh rate of the plots?
>
> I have little idea of web world but I'm quite familiar with Python.
>
> P.S.: Sorry for the repost, now I know fasten has nothing to do with "fast".
>
> --
> 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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.
To unsubscribe from this group and all its topics, 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/900AFF12-627A-4914-A1AE-8EB97D067B99%40continuum.io.
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/CAJ8%2Bds1LzzZNjB%2BUUPgwVr1eKR0z2Z8e1kAfnyq0ZnFuPZq4hA%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Final integration would be probably proprietary, but a demo using our public simulations of our robots could be for sure showcased.

Thank you for your interest :slight_smile: I’ll be happy to help on whatever you need. I made that example file exemplifying what I want to do, I can do others to test.

···

2014-12-01 19:31 GMT+01:00 Bryan Van de Ven [email protected]:

Sam,

This is really cool! If there is anything about this that we can ultimately tweet/vine/showcase in a user gallery, please let us know. (Of course if it is not obliquely releasable that is perfectly understandable.)

This is suddenly a topic of interest so I will definitely make sure it is prioritized for the next dev build after 0.7 release. As I mentioned I don’t think it should be too much work to add a new REST call or two that takes just new data to append and can also patch the client data sources via web sockets. I would like to say that it could be in a few weeks but with the holidays coming up a more reasonable conservative estimate would be early January. I have created an issue on our GH issue tracker that you can use to follow or contribute to the discussion and progress:

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

Thanks,

Bryan

On Dec 1, 2014, at 12:18 PM, Sam Pfeiffer [email protected] wrote:

The real case is:

I have a humanoid robot that has maaany motors. Let’s say between 36 and 48. All of them are spitting out position, velocity, acceleration, force, goal position, error in position, and maybe more stuff. At 50Hz.

First of all I would like to be able to plot these 6 plots referring to a motor at the same page. As real time as possible.

Then I would like to plot a subsection of them, all the motors that form an arm (7) and some plots of them, maybe just position. Ideally I’ll try to make this dynamic, like… choose the group, and choose what you want to see. Well, that’s kind of another problem probably.

I would like to update the plot at every cycle I have new data (so, 50Hz, not necessarily at the same time for all the graphs… but that’s not a requisite). At every update I’m just adding/replacing one element of the graph (popping the oldest one and adding the new one on the other side of the list of data). I tried using a very big buffer for the data (100.000 samples) and bokeh-server didn’t like it much.

I can generate dynamically the plots I want from the available data (depending on the robot there are a different quantity of motors and data available in them).

So, yeah, I would like to have 6 plots updating at 50Hz their data synchronously (to make it easier?).

Help! haha

P.S.: Thank you very much for your attention. Once this works it will be something very cool to show.

2014-12-01 18:24 GMT+01:00 Bryan Van de Ven [email protected]:

Hi Sam,

Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don’t think we have have added an “upate” or “patch” to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.

Bryan

On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer [email protected] wrote:

Hello,

I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.

I’ve got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

When you execute it (python run_multiple_plots.py 4) with bokeh-server running you’ll see the number of plots you asked with the generated data plotting.

The problem is… it’s slow.

The line:

cursession().store_objects(myplot[‘data_source’])

Takes a while to execute.

Also, even with only one plot, if I give a fast update rate (I modify the plotting data every… say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.

So my questions are:

  1. How can I make faster showing multiple plots?
  1. How can I make faster the refresh rate of the plots?

I have little idea of web world but I’m quite familiar with Python.

P.S.: Sorry for the repost, now I know fasten has nothing to do with “fast”.

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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.

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

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.

To unsubscribe from this group and all its topics, 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/900AFF12-627A-4914-A1AE-8EB97D067B99%40continuum.io.

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/CAJ8%2Bds1LzzZNjB%2BUUPgwVr1eKR0z2Z8e1kAfnyq0ZnFuPZq4hA%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 a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.

To unsubscribe from this group and all its topics, 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/C5B0A50E-C6F2-4347-97AE-456B453390FD%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hello, I’m bumping this thread as quite some time has passed and now we are on bokeh 0.7.1.

I just tried my proof of concept again with current version (using conda to have an easy installation, pretty cool):

https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

And trying to have 6 plots at the same time is faster than before but still way too slow.

I added a bit of code to do timing of it. Using 2 plots (python run_multiple_plots.py 2) it takes 0.1-0.2s to update each graph.

When putting 6 graph (python run_multiple_plots.py 6) it takes 0.5s for each graph. Trying 30 plots… well 1-2s each graph.

Also if I test the 30 plots. Stop it. And then launch the 2 plots. It still goes superslow at 1-2s for each graph update rate. I need to go to http://localhost:5006/bokeh/ and delete the document. Then if I launch the 2 plots version it’s working at it’s initial speed again.

So yeah, is there any new API (and example?) to use for having faster updates?

Thank you :slight_smile:

···

2014-12-01 19:38 GMT+01:00 Sam Pfeiffer [email protected]:

Final integration would be probably proprietary, but a demo using our public simulations of our robots could be for sure showcased.

Thank you for your interest :slight_smile: I’ll be happy to help on whatever you need. I made that example file exemplifying what I want to do, I can do others to test.

2014-12-01 19:31 GMT+01:00 Bryan Van de Ven [email protected]:

Sam,

This is really cool! If there is anything about this that we can ultimately tweet/vine/showcase in a user gallery, please let us know. (Of course if it is not obliquely releasable that is perfectly understandable.)

This is suddenly a topic of interest so I will definitely make sure it is prioritized for the next dev build after 0.7 release. As I mentioned I don’t think it should be too much work to add a new REST call or two that takes just new data to append and can also patch the client data sources via web sockets. I would like to say that it could be in a few weeks but with the holidays coming up a more reasonable conservative estimate would be early January. I have created an issue on our GH issue tracker that you can use to follow or contribute to the discussion and progress:

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

Thanks,

Bryan

On Dec 1, 2014, at 12:18 PM, Sam Pfeiffer [email protected] wrote:

The real case is:

I have a humanoid robot that has maaany motors. Let’s say between 36 and 48. All of them are spitting out position, velocity, acceleration, force, goal position, error in position, and maybe more stuff. At 50Hz.

First of all I would like to be able to plot these 6 plots referring to a motor at the same page. As real time as possible.

Then I would like to plot a subsection of them, all the motors that form an arm (7) and some plots of them, maybe just position. Ideally I’ll try to make this dynamic, like… choose the group, and choose what you want to see. Well, that’s kind of another problem probably.

I would like to update the plot at every cycle I have new data (so, 50Hz, not necessarily at the same time for all the graphs… but that’s not a requisite). At every update I’m just adding/replacing one element of the graph (popping the oldest one and adding the new one on the other side of the list of data). I tried using a very big buffer for the data (100.000 samples) and bokeh-server didn’t like it much.

I can generate dynamically the plots I want from the available data (depending on the robot there are a different quantity of motors and data available in them).

So, yeah, I would like to have 6 plots updating at 50Hz their data synchronously (to make it easier?).

Help! haha

P.S.: Thank you very much for your attention. Once this works it will be something very cool to show.

2014-12-01 18:24 GMT+01:00 Bryan Van de Ven [email protected]:

Hi Sam,

Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don’t think we have have added an “upate” or “patch” to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.

Bryan

On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer [email protected] wrote:

Hello,

I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.

I’ve got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

When you execute it (python run_multiple_plots.py 4) with bokeh-server running you’ll see the number of plots you asked with the generated data plotting.

The problem is… it’s slow.

The line:

cursession().store_objects(myplot[‘data_source’])

Takes a while to execute.

Also, even with only one plot, if I give a fast update rate (I modify the plotting data every… say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.

So my questions are:

  1. How can I make faster showing multiple plots?
  1. How can I make faster the refresh rate of the plots?

I have little idea of web world but I’m quite familiar with Python.

P.S.: Sorry for the repost, now I know fasten has nothing to do with “fast”.

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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.

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

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.

To unsubscribe from this group and all its topics, 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/900AFF12-627A-4914-A1AE-8EB97D067B99%40continuum.io.

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/CAJ8%2Bds1LzzZNjB%2BUUPgwVr1eKR0z2Z8e1kAfnyq0ZnFuPZq4hA%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 a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.

To unsubscribe from this group and all its topics, 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/C5B0A50E-C6F2-4347-97AE-456B453390FD%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Sam,

I hope in the next few days I can investigate this in more detail (your script is a fantastic starting point). I can verify that with 30 plots it does indeed slow down to basically unusable levels. I will pass this on to the rest of the team and see what we can dig up. I will say that some improvements being worked out now should have some impact on this sort of thing too, but it maybe 0.8.1 before they really land.

Bryan

···

On Feb 5, 2015, at 7:09 AM, Sam Pfeiffer <[email protected]> wrote:

Hello, I'm bumping this thread as quite some time has passed and now we are on bokeh 0.7.1.

I just tried my proof of concept again with current version (using conda to have an easy installation, pretty cool):
https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py

And trying to have 6 plots at the same time is faster than before but still way too slow.
I added a bit of code to do timing of it. Using 2 plots (python run_multiple_plots.py 2) it takes 0.1-0.2s to update each graph.
When putting 6 graph (python run_multiple_plots.py 6) it takes 0.5s for each graph. Trying 30 plots... well 1-2s each graph.

Also if I test the 30 plots. Stop it. And then launch the 2 plots. It still goes superslow at 1-2s for each graph update rate. I need to go to http://localhost:5006/bokeh/ and delete the document. Then if I launch the 2 plots version it's working at it's initial speed again.

So yeah, is there any new API (and example?) to use for having faster updates?

Thank you :slight_smile:

2014-12-01 19:38 GMT+01:00 Sam Pfeiffer <[email protected]>:
Final integration would be probably proprietary, but a demo using our public simulations of our robots could be for sure showcased.

Thank you for your interest :slight_smile: I'll be happy to help on whatever you need. I made that example file exemplifying what I want to do, I can do others to test.

2014-12-01 19:31 GMT+01:00 Bryan Van de Ven <[email protected]>:
Sam,

This is really cool! If there is anything about this that we can ultimately tweet/vine/showcase in a user gallery, please let us know. (Of course if it is not obliquely releasable that is perfectly understandable.)

This is suddenly a topic of interest so I will definitely make sure it is prioritized for the next dev build after 0.7 release. As I mentioned I don't think it should be too much work to add a new REST call or two that takes just new data to append and can also patch the client data sources via web sockets. I would like to say that it could be in a few weeks but with the holidays coming up a more reasonable conservative estimate would be early January. I have created an issue on our GH issue tracker that you can use to follow or contribute to the discussion and progress:

        https://github.com/bokeh/bokeh/issues/1481

Thanks,

Bryan

> On Dec 1, 2014, at 12:18 PM, Sam Pfeiffer <[email protected]> wrote:
>
> The real case is:
>
> I have a humanoid robot that has maaany motors. Let's say between 36 and 48. All of them are spitting out position, velocity, acceleration, force, goal position, error in position, and maybe more stuff. At 50Hz.
>
> First of all I would like to be able to plot these 6 plots referring to a motor at the same page. As real time as possible.
>
> Then I would like to plot a subsection of them, all the motors that form an arm (7) and some plots of them, maybe just position. Ideally I'll try to make this dynamic, like... choose the group, and choose what you want to see. Well, that's kind of another problem probably.
>
> I would like to update the plot at every cycle I have new data (so, 50Hz, not necessarily at the same time for all the graphs... but that's not a requisite). At every update I'm just adding/replacing one element of the graph (popping the oldest one and adding the new one on the other side of the list of data). I tried using a very big buffer for the data (100.000 samples) and bokeh-server didn't like it much.
>
> I can generate dynamically the plots I want from the available data (depending on the robot there are a different quantity of motors and data available in them).
>
> So, yeah, I would like to have 6 plots updating at 50Hz their data synchronously (to make it easier?).
>
> Help! haha
>
> P.S.: Thank you very much for your attention. Once this works it will be something very cool to show.
>
> 2014-12-01 18:24 GMT+01:00 Bryan Van de Ven <[email protected]>:
> Hi Sam,
>
> Can you describe your scenario a little more fully? Are you updating all your data on every cycle? If so, how much data? Or do you only need to perform partial updates (e.g., only append a few new points every cycle but otherwise keep all the old data). In this case I don't think we have have added an "upate" or "patch" to the REST interface of bokeh-server yet, but it should not be hard and we could target a dev release with this feature shortly after the upcoming 0.7 release.
>
> Bryan
>
>
> > On Dec 1, 2014, at 10:56 AM, Sam Pfeiffer <[email protected]> wrote:
> >
> > Hello,
> >
> > I want to dynamically plot in the same page as many plots as possible. I have a robotic system that outputs a lot of data and I would like to plot it by sections showing as much info at the same time as possible.
> >
> > I've got a snippet of code that generates plots that update continuouslly: https://github.com/awesomebytes/bokeh_ros/blob/master/scripts/run_multiple_plots.py
> > When you execute it (python run_multiple_plots.py 4) with bokeh-server running you'll see the number of plots you asked with the generated data plotting.
> >
> > The problem is... it's slow.
> >
> > The line:
> >
> > cursession().store_objects(myplot['data_source'])
> >
> > Takes a while to execute.
> >
> > Also, even with only one plot, if I give a fast update rate (I modify the plotting data every... say 0.05s) the plot does not reflect it. There is probably some parameter to configure somewhere to make this faster.
> >
> > So my questions are:
> >
> > 1) How can I make faster showing multiple plots?
> > 2) How can I make faster the refresh rate of the plots?
> >
> > I have little idea of web world but I'm quite familiar with Python.
> >
> > P.S.: Sorry for the repost, now I know fasten has nothing to do with "fast".
> >
> > --
> > 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/fe40312a-807e-4718-bca0-48005870ec65%40continuum.io.
> > For more options, visit https://groups.google.com/a/continuum.io/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.
> To unsubscribe from this group and all its topics, 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/900AFF12-627A-4914-A1AE-8EB97D067B99%40continuum.io.
> 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/CAJ8%2Bds1LzzZNjB%2BUUPgwVr1eKR0z2Z8e1kAfnyq0ZnFuPZq4hA%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 a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/8i01xwr1t0c/unsubscribe.
To unsubscribe from this group and all its topics, 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/C5B0A50E-C6F2-4347-97AE-456B453390FD%40continuum.io.
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/CAJ8%2Bds14PAu3KsAKQWNjq99oDt1Ub7sT-HkhXkwO7cWiOAkEgA%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.