Serve, duplicate plots and how to properly view plots from remote client

Hello. I am new to bokeh and have setup bokeh via conda on my Centos 7 VM for learning and development. In case anyone has issues with this verify that your IP tables have access for port 5006. I can run the following bokeh serv command and connect to it successfully from a browser client with the IP address of 192.168.1.31.

bokeh serve --host 192.168.1.31:5006 --host localhost:5006

``

I can create simple plots using the following code in an jupyter notebook cell from client 192.168.1.31:

import bokeh
from bokeh.plotting import figure, show, output_server, push

p2 = figure(title=“Server Plot”)
p2.circle([2, 1, 5], [4, 3, 4])

output_server(“test2”)

push()

``

Ive come up with the following questions:
What is the correct URL to use to go and view the plot for p2?
Is there a way to determine the correct URL from the client or browse a list of available plots on the server?

I can navigate to http://192.168.1.31:5006/?bokeh-session-id=test2 and see this plot however I also see every other plot I have made to the server regardless of the values used. Is there a way to reset or remove the plots that belong to a specific session id so that i only have one there?

What are the appropriate steps to update an existing plot on a server?

Thanks,
Jonathan

Hi Jonathan,

There are a few different ways to interact with a Bokeh Server I'd suggest you have a read over the use case overview in the User's Guide:

  http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#use-case-scenarios

It's entirely possible the "output server" method is not what you want --- it is quite limited in what it can do. But apart from that it is always good to use the examples as a reference. You can see examples of using the client library here:

  https://github.com/bokeh/bokeh/tree/master/examples/plotting/server

And examples of running Bokeh apps directly in the server here:

  https://github.com/bokeh/bokeh/tree/master/examples/app

Also, since you specifically mention the notebook: there is currently still some work yet to do to make inline plots in the notebook sync to a Bokeh server better. There is an open issue you can track here:
  
  https://github.com/bokeh/bokeh/issues/3461

Ultimately we'd like people to be able to prototype apps in a notebook then just run "bokeh serve" on the notebook file directly to deploy the app.

Thanks,

Bryan

···

On Feb 3, 2016, at 11:07 PM, Jonathan Salassi <[email protected]> wrote:

Hello. I am new to bokeh and have setup bokeh via conda on my Centos 7 VM for learning and development. In case anyone has issues with this verify that your IP tables have access for port 5006. I can run the following bokeh serv command and connect to it successfully from a browser client with the IP address of 192.168.1.31.

bokeh serve --host 192.168.1.31:5006 --host localhost:5006

I can create simple plots using the following code in an jupyter notebook cell from client 192.168.1.31:

import bokeh
from bokeh.plotting import figure, show, output_server, push

p2 = figure(title="Server Plot")
p2.circle([2, 1, 5], [4, 3, 4])

output_server("test2")

push()

Ive come up with the following questions:
What is the correct URL to use to go and view the plot for p2?
Is there a way to determine the correct URL from the client or browse a list of available plots on the server?

I can navigate to http://192.168.1.31:5006/?bokeh-session-id=test2 and see this plot however I also see every other plot I have made to the server regardless of the values used. Is there a way to reset or remove the plots that belong to a specific session id so that i only have one there?

What are the appropriate steps to update an existing plot on a server?

Thanks,
Jonathan

--
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/6d2ab7aa-1e73-454a-a648-4791f3626339%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Awesome. Thanks for the feedback Bryan.

···

On Wednesday, February 3, 2016 at 11:31:05 PM UTC-6, Bryan Van de ven wrote:

Hi Jonathan,

There are a few different ways to interact with a Bokeh Server I’d suggest you have a read over the use case overview in the User’s Guide:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#use-case-scenarios](http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#use-case-scenarios)

It’s entirely possible the “output server” method is not what you want — it is quite limited in what it can do. But apart from that it is always good to use the examples as a reference. You can see examples of using the client library here:

    [https://github.com/bokeh/bokeh/tree/master/examples/plotting/server](https://github.com/bokeh/bokeh/tree/master/examples/plotting/server)

And examples of running Bokeh apps directly in the server here:

    [https://github.com/bokeh/bokeh/tree/master/examples/app](https://github.com/bokeh/bokeh/tree/master/examples/app)

Also, since you specifically mention the notebook: there is currently still some work yet to do to make inline plots in the notebook sync to a Bokeh server better. There is an open issue you can track here:

    [https://github.com/bokeh/bokeh/issues/3461](https://github.com/bokeh/bokeh/issues/3461)

Ultimately we’d like people to be able to prototype apps in a notebook then just run “bokeh serve” on the notebook file directly to deploy the app.

Thanks,

Bryan

On Feb 3, 2016, at 11:07 PM, Jonathan Salassi [email protected] wrote:

Hello. I am new to bokeh and have setup bokeh via conda on my Centos 7 VM for learning and development. In case anyone has issues with this verify that your IP tables have access for port 5006. I can run the following bokeh serv command and connect to it successfully from a browser client with the IP address of 192.168.1.31.

bokeh serve --host 192.168.1.31:5006 --host localhost:5006

I can create simple plots using the following code in an jupyter notebook cell from client 192.168.1.31:

import bokeh

from bokeh.plotting import figure, show, output_server, push

p2 = figure(title=“Server Plot”)

p2.circle([2, 1, 5], [4, 3, 4])

output_server(“test2”)

push()

Ive come up with the following questions:

What is the correct URL to use to go and view the plot for p2?
Is there a way to determine the correct URL from the client or browse a list of available plots on the server?

I can navigate to http://192.168.1.31:5006/?bokeh-session-id=test2 and see this plot however I also see every other plot I have made to the server regardless of the values used. Is there a way to reset or remove the plots that belong to a specific session id so that i only have one there?

What are the appropriate steps to update an existing plot on a server?

Thanks,
Jonathan


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/6d2ab7aa-1e73-454a-a648-4791f3626339%40continuum.io.

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

So I did some more research today and figured out a way to get past the issue i had before. The bokeh client API has an interface to create documents and push them to the server to be rendered to a browser. This was not previously explored in detail when i posted this entry. Today i discovered that the curdoc object has a function called clear which will remove any previous figures from it, then when you push the document again you only end up with the latest version.

···

On Thursday, February 4, 2016 at 11:12:51 AM UTC-6, Jonathan Salassi wrote:

Awesome. Thanks for the feedback Bryan.

On Wednesday, February 3, 2016 at 11:31:05 PM UTC-6, Bryan Van de ven wrote:

Hi Jonathan,

There are a few different ways to interact with a Bokeh Server I’d suggest you have a read over the use case overview in the User’s Guide:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#use-case-scenarios](http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#use-case-scenarios)

It’s entirely possible the “output server” method is not what you want — it is quite limited in what it can do. But apart from that it is always good to use the examples as a reference. You can see examples of using the client library here:

    [https://github.com/bokeh/bokeh/tree/master/examples/plotting/server](https://github.com/bokeh/bokeh/tree/master/examples/plotting/server)

And examples of running Bokeh apps directly in the server here:

    [https://github.com/bokeh/bokeh/tree/master/examples/app](https://github.com/bokeh/bokeh/tree/master/examples/app)

Also, since you specifically mention the notebook: there is currently still some work yet to do to make inline plots in the notebook sync to a Bokeh server better. There is an open issue you can track here:

    [https://github.com/bokeh/bokeh/issues/3461](https://github.com/bokeh/bokeh/issues/3461)

Ultimately we’d like people to be able to prototype apps in a notebook then just run “bokeh serve” on the notebook file directly to deploy the app.

Thanks,

Bryan

On Feb 3, 2016, at 11:07 PM, Jonathan Salassi [email protected] wrote:

Hello. I am new to bokeh and have setup bokeh via conda on my Centos 7 VM for learning and development. In case anyone has issues with this verify that your IP tables have access for port 5006. I can run the following bokeh serv command and connect to it successfully from a browser client with the IP address of 192.168.1.31.

bokeh serve --host 192.168.1.31:5006 --host localhost:5006

I can create simple plots using the following code in an jupyter notebook cell from client 192.168.1.31:

import bokeh

from bokeh.plotting import figure, show, output_server, push

p2 = figure(title=“Server Plot”)

p2.circle([2, 1, 5], [4, 3, 4])

output_server(“test2”)

push()

Ive come up with the following questions:

What is the correct URL to use to go and view the plot for p2?
Is there a way to determine the correct URL from the client or browse a list of available plots on the server?

I can navigate to http://192.168.1.31:5006/?bokeh-session-id=test2 and see this plot however I also see every other plot I have made to the server regardless of the values used. Is there a way to reset or remove the plots that belong to a specific session id so that i only have one there?

What are the appropriate steps to update an existing plot on a server?

Thanks,
Jonathan


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/6d2ab7aa-1e73-454a-a648-4791f3626339%40continuum.io.

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