Multiple bokeh figures on a page (not multiple plots using Grid/row)

Greetings All -

I have a need to have 2 bokeh figures on a page. I need them to separate from each other. Currently I can have only one figure (with multiple plots using grid/rows/columns) but not with multiple figures.

I am using django.

Thanks in advance.

Taposh

Hi,

Given that you 're
using django, I’m guessing you have a template for your
view.

You can pass bokeh.embe d.components
a di ctionary of plot object
and it will return a dictionary of div tags and a single script.

Use the diction ary of div tags throughout your django
template and stick the s cript tag at the bottom, and you
should be good to go.

A similar example is here:

Best,

Bird

···

https://github.com/bokeh/bokeh/blob/master/examples/embed/embed_multiple_responsive.py
On 10/8/16 11:00 AM,
wrote:

[email protected]

Greetings All -

      I have a need to have 2 bokeh figures on a page.

I need them to separate from each other. Currently I can have
only one figure (with multiple plots using grid/rows/columns)
but not with multiple figures.

I am using django.

Thanks in advance.

Taposh

  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/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

Hi,

Thank you for this. This worked. I think the issue I see now is I cannot pass a gridplot (having 4 plots) and another plot as component in the dictionary. What I have to do now is to pass all my plots and then layout on html.

Appreciate if you have any input on this.

Taposh

···

On Sunday, October 9, 2016 at 12:28:30 AM UTC-7, Sarah Bird wrote:

Hi,

Given that you 're
using django, I’m guessing you have a template for your
view.

You can pass bokeh.embe d.components
a di ctionary of plot object
and it will return a dictionary of div tags and a single script.

Use the diction ary of div tags throughout your django
template and stick the s cript tag at the bottom, and you
should be good to go.

A similar example is here:
https://github.com/bokeh/bokeh/blob/master/examples/embed/embed_multiple_responsive.py

Best,

Bird

  On 10/8/16 11:00 AM, > [email protected] wrote:

Greetings All -

      I have a need to have 2 bokeh figures on a page.

I need them to separate from each other. Currently I can have
only one figure (with multiple plots using grid/rows/columns)
but not with multiple figures.

I am using django.

Thanks in advance.

Taposh

  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/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

    [
      <img alt="Continuum Analytics" src="https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000" height="30px" width="150px">
    ](http://continuum.io)

I think the issue I see now is I cannot pass a gridplot
(having 4 plots) and another plot as component in the dictionary.

Really, that’s surprising.

Can you share some code that doesn’t work.

···

On 10/9/16 10:00 AM,
wrote:

[email protected]

Hi,

      Thank you for this. This worked. I think the issue I see

now is I cannot pass a gridplot (having 4 plots) and another
plot as component in the dictionary. What I have to do now is
to pass all my plots and then layout on html.

Appreciate if you have any input on this.

Taposh

        On Sunday, October 9, 2016 at 12:28:30 AM UTC-7, Sarah Bird

wrote:

Hi,

Given that you 're using django, I’m
guessing you have a template for your view.

                  You can

pass bokeh.embed.components a di ctionary of plot
object and it will return a dictionary of
div tags and a
single script.

                  Use the

diction ary of div tags
throughout your django template and stick the s cript tag at the
bottom, and you should be good to go.

                            A similar example

is here:
https://github.com/bokeh/bokeh/blob/master/examples/embed/embed_multiple_responsive.py

Best,

Bird

On 10/8/16 11:00 AM, [email protected]
wrote:

Greetings All -

                  I have a need to

have 2 bokeh figures on a page. I need them to
separate from each other. Currently I can have
only one figure (with multiple plots using
grid/rows/columns) but not with multiple figures.

                  I am using

django.

                  Thanks in

advance.

Taposh

              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/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5efa624c-7ad3-4fad-bad5-60159f13b47f%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

                [ ![Continuum Analytics](https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000) ](http://continuum.io)

  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/936319f5-bb6e-4c86-9073-5b02422c4015%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/936319f5-bb6e-4c86-9073-5b02422c4015%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)