☰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

Image as a background for scatter plots?

Community Support
big_red_frog
big_red_frog

Hi there, appologies if this is posted twice, posted last night but cannot see message.

Having great success in plotting my data with scatter plots in ipython / bokeh.

I would like to try and use an existing png image as a background for the plot which I should be able to calculate the transform to have it in the same coordinate space as the plotted data.

My googlefu is failing me and I can find no relevant example or info, though I suspect this is possible.

Any tips / guidance / examples or RTM links?

Thanks

⌁   Link to post
Luke_Canavan1
Luke_Canavan1

You can just add an image_url glyph to the plot before adding the scatter points. You have to hit reset for the correct ordering to show up (a bug that’s fixed in the 0.9.2dev version). If you set the x_range/y_range to your data range on the figure, you should be able to plot points using that same data range.

Example: http://nbviewer.ipython.org/gist/canavandl/c515370e5e749173ce85

Let me know if you need any clarification.

lukec

···

On Sunday, August 16, 2015 at 10:09:30 AM UTC-5, Anthony Tod wrote:

Hi there, appologies if this is posted twice, posted last night but cannot see message.
Having great success in plotting my data with scatter plots in ipython / bokeh.

I would like to try and use an existing png image as a background for the plot which I should be able to calculate the transform to have it in the same coordinate space as the plotted data.

My googlefu is failing me and I can find no relevant example or info, though I suspect this is possible.

Any tips / guidance / examples or RTM links?

Thanks

⌁   Link to post
big_red_frog
big_red_frog

Excellent, thanks, all working now.

Though I need to refresh as you point out to get correct ordering.

···

On Tuesday, August 18, 2015 at 5:19:19 PM UTC-4, lcan...@continuum.io wrote:

You can just add an image_url glyph to the plot before adding the scatter points. You have to hit reset for the correct ordering to show up (a bug that’s fixed in the 0.9.2dev version). If you set the x_range/y_range to your data range on the figure, you should be able to plot points using that same data range.

Example: http://nbviewer.ipython.org/gist/canavandl/c515370e5e749173ce85

Let me know if you need any clarification.

lukec

On Sunday, August 16, 2015 at 10:09:30 AM UTC-5, Anthony Tod wrote:

Hi there, appologies if this is posted twice, posted last night but cannot see message.
Having great success in plotting my data with scatter plots in ipython / bokeh.

I would like to try and use an existing png image as a background for the plot which I should be able to calculate the transform to have it in the same coordinate space as the plotted data.

My googlefu is failing me and I can find no relevant example or info, though I suspect this is possible.

Any tips / guidance / examples or RTM links?

Thanks

⌁   Link to post

End of archived discussion · Replies are disabled