Image as a background for scatter plots?

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

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

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, [email protected] 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