Guidance on tools and linked plots

I’m seeing some buggy behaviour when experimenting with linked plots (shared x_range) and would appreciated some guidance.

  • Do the linked plots have to share the same data? Or can I display different data as long as the x_range is shared?

  • Do I need to share both x_range and y_range, or will a shared x_range only work?

  • If I share only the x_range do I need to make sure the zoom is width only?

  • Do the actual tools need to be created just once (if using explicit tool constructors, not names)? Or can I create new tools for each plot?

  • If the tools need to be created just once, can they still be displayed multiple times (on separate figures)? Or do shared tools need to be owned /displayed by the outer container (can’t remember what it’s called - the row/column/grid)?

  • What about tools like the HoverTool() where I’d like a different tool (different formatting) for each plot?

  • Is there anywhere that documents this? I’ve started asking these questions after reading bug reports where people are doing things “wrong”.

Thanks,

Andrew

Hi,

You don’t need to worry any of those things. You can share one, or both. You have have any tools, the same or different. I what would be more helpful is for you describe what you are actually encountering, and provide real complete code to reproduce it. Just stating there is “buggy behavior” does not give anyone enough information to help.

Thanks,

Bryan

···

On Jan 20, 2019, at 04:49, [email protected] wrote:

I’m seeing some buggy behaviour when experimenting with linked plots (shared x_range) and would appreciated some guidance.

  • Do the linked plots have to share the same data? Or can I display different data as long as the x_range is shared?
  • Do I need to share both x_range and y_range, or will a shared x_range only work?
  • If I share only the x_range do I need to make sure the zoom is width only?
  • Do the actual tools need to be created just once (if using explicit tool constructors, not names)? Or can I create new tools for each plot?
  • If the tools need to be created just once, can they still be displayed multiple times (on separate figures)? Or do shared tools need to be owned /displayed by the outer container (can’t remember what it’s called - the row/column/grid)?
  • What about tools like the HoverTool() where I’d like a different tool (different formatting) for each plot?
  • Is there anywhere that documents this? I’ve started asking these questions after reading bug reports where people are doing things “wrong”.

Thanks,

Andrew

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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%40continuum.io.

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

sure. but reporting a bug requires a lot of work reducing the code to
something simple that still shows the problem. so it makes sense to
ask first.

thanks,
andrew

···

On Sun, Jan 20, 2019 at 08:59:03AM -0800, Bryan Van de ven wrote:

Hi,

You don't need to worry any of those things. You can share one, or both. You have have any tools, the same or different. I what would be more helpful is for you describe what you are actually encountering, and provide real complete code to reproduce it. Just stating there is "buggy behavior" does not give anyone enough information to help.

Thanks,

Bryan

> On Jan 20, 2019, at 04:49, [email protected] wrote:
>
> I'm seeing some buggy behaviour when experimenting with linked plots (shared x_range) and would appreciated some guidance.
>
> * Do the linked plots have to share the same data? Or can I display different data as long as the x_range is shared?
>
> * Do I need to share both x_range and y_range, or will a shared x_range only work?
>
> * If I share only the x_range do I need to make sure the zoom is width only?
>
> * Do the actual tools need to be created just once (if using explicit tool constructors, not names)? Or can I create new tools for each plot?
>
> * If the tools need to be created just once, can they still be displayed multiple times (on separate figures)? Or do shared tools need to be owned /displayed by the outer container (can't remember what it's called - the row/column/grid)?
>
> * What about tools like the HoverTool() where I'd like a different tool (different formatting) for each plot?
>
> * Is there anywhere that documents this? I've started asking these questions after reading bug reports where people are doing things "wrong".
>
> Thanks,
> Andrew
>
> --
> 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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/EA960786-B7DC-4F57-8D63-4F1B67E5CC25%40anaconda.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Sorry to keep banging on here, but I am having trouble reproducing
this in a simple example and have another question:

Is there something tool-related that would require round-tripping to
the server?

I was assuming that the JS would run purely client-side, and that
seems to be the case in my (simple) tests, but in my (more complex)
application I am having problems ("related" plots becoming
unresponsive to tools) when the server is stopped (this is using a
Tornado server to push data to a Firefox client).

Thanks,
Andrew

···

On Sun, Jan 20, 2019 at 04:49:19AM -0800, [email protected] wrote:

I'm seeing some buggy behaviour when experimenting with linked plots
(shared x_range) and would appreciated some guidance.

* Do the linked plots have to share the same data? Or can I display
different data as long as the x_range is shared?

* Do I need to share both x_range and y_range, or will a shared x_range
only work?

* If I share only the x_range do I need to make sure the zoom is width only?

* Do the actual tools need to be created just once (if using explicit tool
constructors, not names)? Or can I create new tools for each plot?

* If the tools need to be created just once, can they still be displayed
multiple times (on separate figures)? Or do shared tools need to be owned
/displayed by the outer container (can't remember what it's called - the
row/column/grid)?

* What about tools like the HoverTool() where I'd like a different tool
(different formatting) for each plot?

* Is there anywhere that documents this? I've started asking these
questions after reading bug reports where people are doing things "wrong".

Thanks,
Andrew

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

Bokeh server applications maintain a persistent web socket connection between the client and server. All updates to any properties, e.g. "source.data = new_data" are automatically synced between both sides. So, the answer to the question is that *anything that updates* requires round tripping to the server. For a tool-related examples: if a selection is made with with a lasso tool, BokehJS will try to sync that new selection value back to the server. Or if pan/zoom tools update the ranges. If the connection is lost, this will definitely cause problems. The scenario of a Bokeh app page functioning after being disconnected is definitely not one we had in mind.

Thanks,

Bryan

···

On Jan 21, 2019, at 07:10, andrew cooke <[email protected]> wrote:

Sorry to keep banging on here, but I am having trouble reproducing
this in a simple example and have another question:

Is there something tool-related that would require round-tripping to
the server?

I was assuming that the JS would run purely client-side, and that
seems to be the case in my (simple) tests, but in my (more complex)
application I am having problems ("related" plots becoming
unresponsive to tools) when the server is stopped (this is using a
Tornado server to push data to a Firefox client).

Thanks,
Andrew

On Sun, Jan 20, 2019 at 04:49:19AM -0800, [email protected] wrote:

I'm seeing some buggy behaviour when experimenting with linked plots
(shared x_range) and would appreciated some guidance.

* Do the linked plots have to share the same data? Or can I display
different data as long as the x_range is shared?

* Do I need to share both x_range and y_range, or will a shared x_range
only work?

* If I share only the x_range do I need to make sure the zoom is width only?

* Do the actual tools need to be created just once (if using explicit tool
constructors, not names)? Or can I create new tools for each plot?

* If the tools need to be created just once, can they still be displayed
multiple times (on separate figures)? Or do shared tools need to be owned
/displayed by the outer container (can't remember what it's called - the
row/column/grid)?

* What about tools like the HoverTool() where I'd like a different tool
(different formatting) for each plot?

* Is there anywhere that documents this? I've started asking these
questions after reading bug reports where people are doing things "wrong".

Thanks,
Andrew

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%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/20190121151036.5tme2ooeay7vsbpe%40acooke.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks! In that case, the simplest solution is probably to just keep
the server running...

···

On Mon, Jan 21, 2019 at 09:40:42AM -0800, Bryan Van de ven wrote:

Hi,

Bokeh server applications maintain a persistent web socket connection between the client and server. All updates to any properties, e.g. "source.data = new_data" are automatically synced between both sides. So, the answer to the question is that *anything that updates* requires round tripping to the server. For a tool-related examples: if a selection is made with with a lasso tool, BokehJS will try to sync that new selection value back to the server. Or if pan/zoom tools update the ranges. If the connection is lost, this will definitely cause problems. The scenario of a Bokeh app page functioning after being disconnected is definitely not one we had in mind.

Thanks,

Bryan

> On Jan 21, 2019, at 07:10, andrew cooke <[email protected]> wrote:
>
>
> Sorry to keep banging on here, but I am having trouble reproducing
> this in a simple example and have another question:
>
> Is there something tool-related that would require round-tripping to
> the server?
>
> I was assuming that the JS would run purely client-side, and that
> seems to be the case in my (simple) tests, but in my (more complex)
> application I am having problems ("related" plots becoming
> unresponsive to tools) when the server is stopped (this is using a
> Tornado server to push data to a Firefox client).
>
> Thanks,
> Andrew
>
>
>
> On Sun, Jan 20, 2019 at 04:49:19AM -0800, [email protected] wrote:
>> I'm seeing some buggy behaviour when experimenting with linked plots
>> (shared x_range) and would appreciated some guidance.
>>
>> * Do the linked plots have to share the same data? Or can I display
>> different data as long as the x_range is shared?
>>
>> * Do I need to share both x_range and y_range, or will a shared x_range
>> only work?
>>
>> * If I share only the x_range do I need to make sure the zoom is width only?
>>
>> * Do the actual tools need to be created just once (if using explicit tool
>> constructors, not names)? Or can I create new tools for each plot?
>>
>> * If the tools need to be created just once, can they still be displayed
>> multiple times (on separate figures)? Or do shared tools need to be owned
>> /displayed by the outer container (can't remember what it's called - the
>> row/column/grid)?
>>
>> * What about tools like the HoverTool() where I'd like a different tool
>> (different formatting) for each plot?
>>
>> * Is there anywhere that documents this? I've started asking these
>> questions after reading bug reports where people are doing things "wrong".
>>
>> Thanks,
>> Andrew
>>
>> --
>> You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
>> To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%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/20190121151036.5tme2ooeay7vsbpe%40acooke.org.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/D3BCFFB9-FE9C-4222-A0C7-341742AAF8BE%40anaconda.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

Definitely, though just for completeness I will mention that AjaxDataSource, CustomJS callbacks, or custom extensions in standalone (non-bokeh server) documents could all interact with other services or APIs, if needed.

Thanks,

Bryan

···

On Jan 21, 2019, at 10:30, andrew cooke <[email protected]> wrote:

Thanks! In that case, the simplest solution is probably to just keep
the server running...

On Mon, Jan 21, 2019 at 09:40:42AM -0800, Bryan Van de ven wrote:
Hi,

Bokeh server applications maintain a persistent web socket connection between the client and server. All updates to any properties, e.g. "source.data = new_data" are automatically synced between both sides. So, the answer to the question is that *anything that updates* requires round tripping to the server. For a tool-related examples: if a selection is made with with a lasso tool, BokehJS will try to sync that new selection value back to the server. Or if pan/zoom tools update the ranges. If the connection is lost, this will definitely cause problems. The scenario of a Bokeh app page functioning after being disconnected is definitely not one we had in mind.

Thanks,

Bryan

On Jan 21, 2019, at 07:10, andrew cooke <[email protected]> wrote:

Sorry to keep banging on here, but I am having trouble reproducing
this in a simple example and have another question:

Is there something tool-related that would require round-tripping to
the server?

I was assuming that the JS would run purely client-side, and that
seems to be the case in my (simple) tests, but in my (more complex)
application I am having problems ("related" plots becoming
unresponsive to tools) when the server is stopped (this is using a
Tornado server to push data to a Firefox client).

Thanks,
Andrew

On Sun, Jan 20, 2019 at 04:49:19AM -0800, [email protected] wrote:
I'm seeing some buggy behaviour when experimenting with linked plots
(shared x_range) and would appreciated some guidance.

* Do the linked plots have to share the same data? Or can I display
different data as long as the x_range is shared?

* Do I need to share both x_range and y_range, or will a shared x_range
only work?

* If I share only the x_range do I need to make sure the zoom is width only?

* Do the actual tools need to be created just once (if using explicit tool
constructors, not names)? Or can I create new tools for each plot?

* If the tools need to be created just once, can they still be displayed
multiple times (on separate figures)? Or do shared tools need to be owned
/displayed by the outer container (can't remember what it's called - the
row/column/grid)?

* What about tools like the HoverTool() where I'd like a different tool
(different formatting) for each plot?

* Is there anywhere that documents this? I've started asking these
questions after reading bug reports where people are doing things "wrong".

Thanks,
Andrew

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/bad82feb-952c-4b5e-a8b6-60bf6d63632d%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/20190121151036.5tme2ooeay7vsbpe%40acooke.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/UdZJQwNd9o0/unsubscribe.
To unsubscribe from this group and all its topics, 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/D3BCFFB9-FE9C-4222-A0C7-341742AAF8BE%40anaconda.com.
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]io.
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/20190121183055.jq5cekgy26dif6kj%40acooke.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.