☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Dynamically update scatterplot

Community Support
Sam_Pfeiffer
Sam_Pfeiffer

Hello Alexandre,

I wanted to try the scatter plot so I made a little example of a scatter plot updated dynamically for you (just adding random points to a scatter):

Be warned that if you want to update the plot fast or pass big chunks of data you may have problems as reported in other questions in this google group (like my own question: Redirecting to Google Groups ).

Good luck! :slight_smile:

···

El martes, 17 de febrero de 2015, 14:02:40 (UTC+1), Alexandre ABRAHAM escribió:

Hello,

I would like to implement the following figure using Bokeh: https://www.biostat.wisc.edu/~kbroman/D3/corr_w_scatter/
Plotting the correlation matrix is fine. I can also get the clicked cell using the TapTool (thanks for the PR merged 5 days ago!). But I don’t know how to dynamically inject the data into a scatterplot (I am a bokeh beginner).

Do you have any hints? Is it even possible?

Thanks!

Alexandre.

⌁   Link to post
Sam_Pfeiffer
Sam_Pfeiffer

Note that you need bokeh-server running in another shell and I used Bokeh 0.7.1 installed using conda. (I see there is version 0.8 now).

As it may happen to others and this may appear in some google search… I got this error the first time I ran this:

File “/home/sampfeiffer/anaconda/lib/python2.7/dbhash.py”, line 7, in
import bsddb
File “/home/sampfeiffer/anaconda/lib/python2.7/bsddb/init.py”, line 67, in
import _bsddb
ImportError: No module named _bsddb

In bokeh-server shell.

I solved it doing:

conda install bsddb

From there on, everything went fine.

Good luck once again!

···

El martes, 17 de febrero de 2015, 15:19:23 (UTC+1), Sam Pfeiffer escribió:

Hello Alexandre,

I wanted to try the scatter plot so I made a little example of a scatter plot updated dynamically for you (just adding random points to a scatter):

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

Be warned that if you want to update the plot fast or pass big chunks of data you may have problems as reported in other questions in this google group (like my own question: https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/8i01xwr1t0c ).

Good luck! :slight_smile:

El martes, 17 de febrero de 2015, 14:02:40 (UTC+1), Alexandre ABRAHAM escribió:

Hello,

I would like to implement the following figure using Bokeh: https://www.biostat.wisc.edu/~kbroman/D3/corr_w_scatter/
Plotting the correlation matrix is fine. I can also get the clicked cell using the TapTool (thanks for the PR merged 5 days ago!). But I don’t know how to dynamically inject the data into a scatterplot (I am a bokeh beginner).

Do you have any hints? Is it even possible?

Thanks!

Alexandre.

⌁   Link to post
Alexandre_ABRAHAM
Alexandre_ABRAHAM

Hi Sam,

Thanks for your example, it works like a charm with bokeh 0.8 (installed via pip on my box). I think that I can achieve what I want using this.

However, I plan to send this graph to non-technical people also so I would like it to run without a bokeh server behind (so coffee script only). I’ll try to do it and keep you up!

Alex.

···

On Tue, Feb 17, 2015 at 3:22 PM, Sam Pfeiffer r0sw3l@gmail.com wrote:

Note that you need bokeh-server running in another shell and I used Bokeh 0.7.1 installed using conda. (I see there is version 0.8 now).

As it may happen to others and this may appear in some google search… I got this error the first time I ran this:

File “/home/sampfeiffer/anaconda/lib/python2.7/dbhash.py”, line 7, in
import bsddb
File “/home/sampfeiffer/anaconda/lib/python2.7/bsddb/init.py”, line 67, in
import _bsddb
ImportError: No module named _bsddb

In bokeh-server shell.

I solved it doing:

conda install bsddb

From there on, everything went fine.

Good luck once again!

El martes, 17 de febrero de 2015, 15:19:23 (UTC+1), Sam Pfeiffer escribió:

Hello Alexandre,

I wanted to try the scatter plot so I made a little example of a scatter plot updated dynamically for you (just adding random points to a scatter):

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

Be warned that if you want to update the plot fast or pass big chunks of data you may have problems as reported in other questions in this google group (like my own question: https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/8i01xwr1t0c ).

Good luck! :slight_smile:

El martes, 17 de febrero de 2015, 14:02:40 (UTC+1), Alexandre ABRAHAM escribió:

Hello,

I would like to implement the following figure using Bokeh: https://www.biostat.wisc.edu/~kbroman/D3/corr_w_scatter/
Plotting the correlation matrix is fine. I can also get the clicked cell using the TapTool (thanks for the PR merged 5 days ago!). But I don’t know how to dynamically inject the data into a scatterplot (I am a bokeh beginner).

Do you have any hints? Is it even possible?

Thanks!

Alexandre.

–

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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7a03fe65-c9f6-4ec3-a5d0-8221bd2a8d4b%40continuum.io.

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

⌁   Link to post
Sam_Pfeiffer
Sam_Pfeiffer

Hey,

Good to hear it worked and it’s useful for you :slight_smile:

Good luck on the coffee script thingy, I just read what that is and I see is web-world related. I’m quite novice in that field so I can’t really help.

···

El martes, 17 de febrero de 2015, 16:23:25 (UTC+1), Alexandre ABRAHAM escribió:

Hi Sam,

Thanks for your example, it works like a charm with bokeh 0.8 (installed via pip on my box). I think that I can achieve what I want using this.

However, I plan to send this graph to non-technical people also so I would like it to run without a bokeh server behind (so coffee script only). I’ll try to do it and keep you up!

Alex.

On Tue, Feb 17, 2015 at 3:22 PM, Sam Pfeiffer r0s...@gmail.com wrote:

Note that you need bokeh-server running in another shell and I used Bokeh 0.7.1 installed using conda. (I see there is version 0.8 now).

As it may happen to others and this may appear in some google search… I got this error the first time I ran this:

File “/home/sampfeiffer/anaconda/lib/python2.7/dbhash.py”, line 7, in
import bsddb
File “/home/sampfeiffer/anaconda/lib/python2.7/bsddb/init.py”, line 67, in
import _bsddb
ImportError: No module named _bsddb

In bokeh-server shell.

I solved it doing:

conda install bsddb

From there on, everything went fine.

Good luck once again!

El martes, 17 de febrero de 2015, 15:19:23 (UTC+1), Sam Pfeiffer escribió:

Hello Alexandre,

I wanted to try the scatter plot so I made a little example of a scatter plot updated dynamically for you (just adding random points to a scatter):

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

Be warned that if you want to update the plot fast or pass big chunks of data you may have problems as reported in other questions in this google group (like my own question: https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/8i01xwr1t0c ).

Good luck! :slight_smile:

El martes, 17 de febrero de 2015, 14:02:40 (UTC+1), Alexandre ABRAHAM escribió:

Hello,

I would like to implement the following figure using Bokeh: https://www.biostat.wisc.edu/~kbroman/D3/corr_w_scatter/
Plotting the correlation matrix is fine. I can also get the clicked cell using the TapTool (thanks for the PR merged 5 days ago!). But I don’t know how to dynamically inject the data into a scatterplot (I am a bokeh beginner).

Do you have any hints? Is it even possible?

Thanks!

Alexandre.

–

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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7a03fe65-c9f6-4ec3-a5d0-8221bd2a8d4b%40continuum.io.

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

⌁   Link to post
Bryan
Bryan

In addition to the server the new AjaxDataSource may be useful in this case:

  https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/ajax_source.py

It let's you specify a REST endpoint and a polling interval to pull data directly into the client without needing the server. It is brand new, many improvements planned soon.

Bryan

···

On Feb 17, 2015, at 11:09 AM, Sam Pfeiffer <r0sw3l@gmail.com> wrote:

Hey,

Good to hear it worked and it's useful for you :slight_smile:

Good luck on the coffee script thingy, I just read what that is and I see is web-world related. I'm quite novice in that field so I can't really help.

El martes, 17 de febrero de 2015, 16:23:25 (UTC+1), Alexandre ABRAHAM escribió:
Hi Sam,

Thanks for your example, it works like a charm with bokeh 0.8 (installed via pip on my box). I think that I can achieve what I want using this.

However, I plan to send this graph to non-technical people also so I would like it to run without a bokeh server behind (so coffee script only). I'll try to do it and keep you up!

Alex.

On Tue, Feb 17, 2015 at 3:22 PM, Sam Pfeiffer <r0s...@gmail.com> wrote:
Note that you need bokeh-server running in another shell and I used Bokeh 0.7.1 installed using conda. (I see there is version 0.8 now).

As it may happen to others and this may appear in some google search... I got this error the first time I ran this:

  File "/home/sampfeiffer/anaconda/lib/python2.7/dbhash.py", line 7, in <module>
    import bsddb
  File "/home/sampfeiffer/anaconda/lib/python2.7/bsddb/__init__.py", line 67, in <module>
    import _bsddb
ImportError: No module named _bsddb

In bokeh-server shell.

I solved it doing:

conda install bsddb

From there on, everything went fine.

Good luck once again!

El martes, 17 de febrero de 2015, 15:19:23 (UTC+1), Sam Pfeiffer escribió:
Hello Alexandre,

I wanted to try the scatter plot so I made a little example of a scatter plot updated dynamically for you (just adding random points to a scatter):

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

Be warned that if you want to update the plot fast or pass big chunks of data you may have problems as reported in other questions in this google group (like my own question: Redirecting to Google Groups ).

Good luck! :slight_smile:

El martes, 17 de febrero de 2015, 14:02:40 (UTC+1), Alexandre ABRAHAM escribió:
Hello,

I would like to implement the following figure using Bokeh: Correlation matrix with linked scatterplot
Plotting the correlation matrix is fine. I can also get the clicked cell using the TapTool (thanks for the PR merged 5 days ago!). But I don't know how to dynamically inject the data into a scatterplot (I am a bokeh beginner).

Do you have any hints? Is it even possible?

Thanks!

Alexandre.

--
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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7a03fe65-c9f6-4ec3-a5d0-8221bd2a8d4b%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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ce04a7c5-6030-42e8-932f-2bc24fc96a1a%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled