How to use svg as figure background

Hi all,

I’m trying to use an svg as background image for a figure plot. I’ve used the image_url() API in order to achieve this; seems to be the way, only problem is the image won’t scale to fit and fill the whole background.
Any Idea how I can do it?

regards
Armand

There's no way to automatically fill the current plot area. You will have to set the bounds for image_url to match the current data bounds of the plot, explicitly. An "background image" annotation could make a nice feature addition to Bokeh. I'd encourage you to submit a feature request issue on the GitHb issue tracker:

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

It would also be possible to create a custom user extension to do this sort of thing as well. It's a more advanced approach, but if you are interested, we could try to assist.

Bryan

···

On Jun 20, 2016, at 8:57 AM, Armand Zangue <[email protected]> wrote:

Hi all,

I'm trying to use an svg as background image for a figure plot. I've used the image_url() API in order to achieve this; seems to be the way, only problem is the image won't scale to fit and fill the whole background.
Any Idea how I can do it?

regards
Armand

--
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/8d815b78-f513-435a-a8c9-ad5ef3f8daca%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.