Add logo to bokeh plot

hi guys, is it possible to add a small logo to the bokeh plot? like a small icon in the left corner for example

Hi,

If you mean inside the central plot frame, then you could use plot.image_url(...) if the logo is available at some public URL, or plot.image_rgba(...) if you encode the image as an RGBA numpy array. If you mean, in the toolbar, that would require a custom extension.

Thanks,

Bryan

···

On May 18, 2019, at 4:56 AM, Ludvig <[email protected]> wrote:

hi guys, is it possible to add a small logo to the bokeh plot? like a small icon in the left corner for example

--
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/e27522a4-6c9a-4f9e-8900-95346c9a1c04%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

That is the idea, but I would like that the image would not be affected by the wheel zoom or any other zoom on the plot. Can we do it?

Probably also a custom toolbar outside the plot would be nice as well.

···

Il giorno domenica 19 maggio 2019 00:59:18 UTC+2, Bryan Van de Ven ha scritto:

Hi,

If you mean inside the central plot frame, then you could use plot.image_url(…) if the logo is available at some public URL, or plot.image_rgba(…) if you encode the image as an RGBA numpy array. If you mean, in the toolbar, that would require a custom extension.

Thanks,

Bryan

On May 18, 2019, at 4:56 AM, Ludvig [email protected] wrote:

hi guys, is it possible to add a small logo to the bokeh plot? like a small icon in the left corner for example


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/e27522a4-6c9a-4f9e-8900-95346c9a1c04%40continuum.io.

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

Hi,

That's actually going to be a bit difficult at present, as the image glyphs only accept "data" coordinates, not pixel coordinates. So this would currently also require a custom extension to accomplish as far as I know. You can find documentation about creating Bokeh extensions here:

  https://bokeh.pydata.org/en/latest/docs/user_guide/extensions.html

Otherwise, it would be appropriate to open a GitHub feature request issue to discuss how this might be supported by the library directly (e.g. perhaps a new annotation type, or adding fill patthern/hatching support to the existing box annotation).

Thanks,

Bryan

···

On May 19, 2019, at 1:10 AM, [email protected] wrote:

That is the idea, but I would like that the image would not be affected by the wheel zoom or any other zoom on the plot. Can we do it?

Probably also a custom toolbar outside the plot would be nice as well.

Il giorno domenica 19 maggio 2019 00:59:18 UTC+2, Bryan Van de Ven ha scritto:
Hi,

If you mean inside the central plot frame, then you could use plot.image_url(...) if the logo is available at some public URL, or plot.image_rgba(...) if you encode the image as an RGBA numpy array. If you mean, in the toolbar, that would require a custom extension.

Thanks,

Bryan

> On May 18, 2019, at 4:56 AM, Ludvig <[email protected]> wrote:
>
> hi guys, is it possible to add a small logo to the bokeh plot? like a small icon in the left corner for example
>
> --
> 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 bo...@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/e27522a4-6c9a-4f9e-8900-95346c9a1c04%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/d5f699b1-bb84-431b-b62a-dfc26f91c30d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.