Interactive Plot (Server): Hover Tool does not show up after update of Input Data

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(
tooltips=[(“Value”, “@y{0.000}”),
(“Date:”, “@datestr”),
(“File:”,"@flist"),
],
line_policy=“none”,
point_policy=“snap_to_data”,
names = [‘scatter_active’],
name=‘hover_tool’
)
self.plot.add_tools(hover)

``


Hi Ingmar,

It's possible this is a bug, I'm not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

···

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze <[email protected]> wrote:

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via "names".
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x='dt', y='y', source=self.source, alpha=0.3, name='scatter_active')
...

hover = HoverTool(
tooltips=[("Value", "@y{0.000}"),
("Date:", "@datestr"),
("File:","@flist"),
],
line_policy="none",
point_policy="snap_to_data",
names = ['scatter_active'],
name='hover_tool'
)
self.plot.add_tools(hover)

--
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/002dea87-f979-4758-9248-3b2eb6ac67fe%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi Bryan,
thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )
The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column ‘y’ gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there’s something else that’s also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):

“”"
Function changes the y-value according to the selected index from RadioButton Panel
Update of source data and background plots
:return:
“”"

update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!

layer = self.radio_btns.labels[self.radio_btns.active]

 y = np.array(self.source_base.data[layer], np.float32).copy()

self.source.data = dict(x=self.source.data[‘x’],
y=y,
y_mod=self.source.data[‘y_mod’],
yr=self.source.data[‘yr’],
mth=self.source.data[‘mth’],
dt=self.source.data[‘dt’],
y_mod_new=self.source.data[‘y_mod_new’],
y_diff=self.source.data[‘y_diff’],
datestr=self.source.data[‘datestr’],
flist=self.source.data[‘flist’])

``

sliders_app.py (22 KB)

···

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:

Hi Ingmar,

It’s possible this is a bug, I’m not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze [email protected] wrote:

Hi,

I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.

At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.

After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.

If you need more information, feel free to ask.

Thanks in advance

Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(

tooltips=[(“Value”, “@y{0.000}”),

(“Date:”, “@datestr”),

(“File:”,“@flist”),

],

line_policy=“none”,

point_policy=“snap_to_data”,

names = [‘scatter_active’],

name=‘hover_tool’

)

self.plot.add_tools(hover)


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/002dea87-f979-4758-9248-3b2eb6ac67fe%40continuum.io.

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

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

···

On Dec 8, 2015, at 9:27 AM, Ingmar Nitze <[email protected]> wrote:

Hi Bryan,
thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )
The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column 'y' gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there's something else that's also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):
"""
Function changes the y-value according to the selected index from RadioButton Panel
Update of source data and background plots
:return:
"""
# update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!
layer = self.radio_btns.labels[self.radio_btns.active]
y = np.array(self.source_base.data[layer], np.float32).copy()
...

self.source.data = dict(x=self.source.data['x'],
y=y,
y_mod=self.source.data['y_mod'],
yr=self.source.data['yr'],
mth=self.source.data['mth'],
dt=self.source.data['dt'],
y_mod_new=self.source.data['y_mod_new'],
y_diff=self.source.data['y_diff'],
datestr=self.source.data['datestr'],
flist=self.source.data['flist'])

<Auto Generated Inline Image 1.png>

<Auto Generated Inline Image 2.png>

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:
Hi Ingmar,

It's possible this is a bug, I'm not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

> On Dec 8, 2015, at 7:24 AM, Ingmar Nitze <[email protected]> wrote:
>
> Hi,
> I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via "names".
> At this stage, everything works as expected.
>
> The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
> After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.
>
> Any idea for a solution? This issue has been a real headache for me so far.
> If you need more information, feel free to ask.
>
> Thanks in advance
> Ingmar
>
> self.plot.scatter(x='dt', y='y', source=self.source, alpha=0.3, name='scatter_active')
> ...
>
> hover = HoverTool(
> tooltips=[("Value", "@y{0.000}"),
> ("Date:", "@datestr"),
> ("File:","@flist"),
> ],
> line_policy="none",
> point_policy="snap_to_data",
> names = ['scatter_active'],
> name='hover_tool'
> )
> self.plot.add_tools(hover)
>
>
>
>
> --
> 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 bokeh+un...@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/002dea87-f979-4758-9248-3b2eb6ac67fe%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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
<sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>

Hi Bryan,
the system setup is the following

Win 7
Python 2.7.9
bokeh 0.10.0

The application is actually developed from the sliders example, but with loads of additions.

···

On Thursday, December 10, 2015 at 5:44:15 AM UTC+1, Bryan Van de ven wrote:

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

On Dec 8, 2015, at 9:27 AM, Ingmar Nitze [email protected] wrote:

Hi Bryan,

thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )

The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column ‘y’ gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there’s something else that’s also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):

“”"

Function changes the y-value according to the selected index from RadioButton Panel

Update of source data and background plots

:return:

“”"

update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!

layer = self.radio_btns.labels[self.radio_btns.active]

y = np.array(self.source_base.data[layer], np.float32).copy()

self.source.data = dict(x=self.source.data[‘x’],

y=y,

y_mod=self.source.data[‘y_mod’],

yr=self.source.data[‘yr’],

mth=self.source.data[‘mth’],

dt=self.source.data[‘dt’],

y_mod_new=self.source.data[‘y_mod_new’],

y_diff=self.source.data[‘y_diff’],

datestr=self.source.data[‘datestr’],

flist=self.source.data[‘flist’])

<Auto Generated Inline Image 1.png>

<Auto Generated Inline Image 2.png>

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:

Hi Ingmar,

It’s possible this is a bug, I’m not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze [email protected] wrote:

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(
tooltips=[(“Value”, “@y{0.000}”),
(“Date:”, “@datestr”),
(“File:”,“@flist”),
],
line_policy=“none”,
point_policy=“snap_to_data”,
names = [‘scatter_active’],
name=‘hover_tool’
)
self.plot.add_tools(hover)


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/002dea87-f979-4758-9248-3b2eb6ac67fe%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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io.

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

<sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>

Just checking in. Has there been any solution for this?

I saw a GitHub issue that seems to have the same problem but no good solution yet:

···

On Thursday, December 10, 2015 at 12:41:15 AM UTC-8, Ingmar Nitze wrote:

Hi Bryan,
the system setup is the following

Win 7
Python 2.7.9
bokeh 0.10.0

The application is actually developed from the sliders example, but with loads of additions.

On Thursday, December 10, 2015 at 5:44:15 AM UTC+1, Bryan Van de ven wrote:

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

On Dec 8, 2015, at 9:27 AM, Ingmar Nitze [email protected] wrote:

Hi Bryan,

thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )

The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column ‘y’ gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there’s something else that’s also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):

“”"

Function changes the y-value according to the selected index from RadioButton Panel

Update of source data and background plots

:return:

“”"

update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!

layer = self.radio_btns.labels[self.radio_btns.active]

y = np.array(self.source_base.data[layer], np.float32).copy()

self.source.data = dict(x=self.source.data[‘x’],

y=y,

y_mod=self.source.data[‘y_mod’],

yr=self.source.data[‘yr’],

mth=self.source.data[‘mth’],

dt=self.source.data[‘dt’],

y_mod_new=self.source.data[‘y_mod_new’],

y_diff=self.source.data[‘y_diff’],

datestr=self.source.data[‘datestr’],

flist=self.source.data[‘flist’])

<Auto Generated Inline Image 1.png>

<Auto Generated Inline Image 2.png>

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:

Hi Ingmar,

It’s possible this is a bug, I’m not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze [email protected] wrote:

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(
tooltips=[(“Value”, “@y{0.000}”),
(“Date:”, “@datestr”),
(“File:”,“@flist”),
],
line_policy=“none”,
point_policy=“snap_to_data”,
names = [‘scatter_active’],
name=‘hover_tool’
)
self.plot.add_tools(hover)


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/002dea87-f979-4758-9248-3b2eb6ac67fe%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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io.

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

<sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>

Looking at that issue, the code refers to the old (and now completely removed server). Are you saying you have experienced that problem or a similar problem with the new server as of 0.11 release? If so, can you file a new GH issue with code to reproduce (I'm going to close that issue since the old server no longer exists).

Alternatively, if you mean to say that you are using 0.10 and are asking if there will be a fix for the old server, I am afraid the answer is no, we simply do not have the resources to try and maintain any aspect of the old server. If this is the case I encourage you to update, the new server is vastly more stable, performant, and easier to use. The new server has already seen more use and adoption in a two months than the old server saw in two years, and is the only thing that will be supported going forward.

Thanks,

Bryan

···

On Apr 21, 2016, at 1:38 PM, wcopeland <[email protected]> wrote:

Just checking in. Has there been any solution for this?

I saw a GitHub issue that seems to have the same problem but no good solution yet:
https://github.com/bokeh/bokeh/issues/2584

On Thursday, December 10, 2015 at 12:41:15 AM UTC-8, Ingmar Nitze wrote:
Hi Bryan,
the system setup is the following

Win 7
Python 2.7.9
bokeh 0.10.0

The application is actually developed from the sliders example, but with loads of additions.

On Thursday, December 10, 2015 at 5:44:15 AM UTC+1, Bryan Van de ven wrote:

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

> On Dec 8, 2015, at 9:27 AM, Ingmar Nitze <[email protected]> wrote:
>
> Hi Bryan,
> thanks for the quick reply
>
> The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )
> The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column 'y' gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)
>
> I guess there's something else that's also changing, which is linked to the hover, but not to other objects within the plot.
>
> Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).
>
> Code and 2 Figures are attached
>
> Thanks for your effort
>
>
>
> lines 431 ff.
>
> def change_data_index(self):
> """
> Function changes the y-value according to the selected index from RadioButton Panel
> Update of source data and background plots
> :return:
> """
> # update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!
> layer = self.radio_btns.labels[self.radio_btns.active]
> y = np.array(self.source_base.data[layer], np.float32).copy()
> ...
>
> self.source.data = dict(x=self.source.data['x'],
> y=y,
> y_mod=self.source.data['y_mod'],
> yr=self.source.data['yr'],
> mth=self.source.data['mth'],
> dt=self.source.data['dt'],
> y_mod_new=self.source.data['y_mod_new'],
> y_diff=self.source.data['y_diff'],
> datestr=self.source.data['datestr'],
> flist=self.source.data['flist'])
>
>
> <Auto Generated Inline Image 1.png>
>
> <Auto Generated Inline Image 2.png>
>
> On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:
> Hi Ingmar,
>
> It's possible this is a bug, I'm not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.
>
> Thanks,
>
> Bryan
>
> > On Dec 8, 2015, at 7:24 AM, Ingmar Nitze <[email protected]> wrote:
> >
> > Hi,
> > I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via "names".
> > At this stage, everything works as expected.
> >
> > The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
> > After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.
> >
> > Any idea for a solution? This issue has been a real headache for me so far.
> > If you need more information, feel free to ask.
> >
> > Thanks in advance
> > Ingmar
> >
> > self.plot.scatter(x='dt', y='y', source=self.source, alpha=0.3, name='scatter_active')
> > ...
> >
> > hover = HoverTool(
> > tooltips=[("Value", "@y{0.000}"),
> > ("Date:", "@datestr"),
> > ("File:","@flist"),
> > ],
> > line_policy="none",
> > point_policy="snap_to_data",
> > names = ['scatter_active'],
> > name='hover_tool'
> > )
> > self.plot.add_tools(hover)
> >
> >
> >
> >
> > --
> > 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 bokeh+un...@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/002dea87-f979-4758-9248-3b2eb6ac67fe%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 bokeh+un...@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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
> <sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>

--
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/906ceea9-9cf0-4bbb-a85e-e894beb3e448%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I am using Bokeh 0.11.1. I mocked up some code that reproduces the error: Bokeh Hover Disappears - Pastebin.com
This script basically refreshes a heat map (HEAT_DATA) based on coordinates selected on a scatter plot (SCATTER_DATA). Selections are made using common indices.
bokeh server testScript.py
The HoverTool works perfectly fine for the heat map to start. Once you select a few points in the scatter plot, the heat map refreshes, but the HoverTool does not show data when hovering over most rectangles in the refreshed heat map.

I will open a GitHub issue as well.

Cheers!

···

On Thursday, April 21, 2016 at 12:42:00 PM UTC-7, Bryan Van de ven wrote:

Looking at that issue, the code refers to the old (and now completely removed server). Are you saying you have experienced that problem or a similar problem with the new server as of 0.11 release? If so, can you file a new GH issue with code to reproduce (I’m going to close that issue since the old server no longer exists).

Alternatively, if you mean to say that you are using 0.10 and are asking if there will be a fix for the old server, I am afraid the answer is no, we simply do not have the resources to try and maintain any aspect of the old server. If this is the case I encourage you to update, the new server is vastly more stable, performant, and easier to use. The new server has already seen more use and adoption in a two months than the old server saw in two years, and is the only thing that will be supported going forward.

Thanks,

Bryan

On Apr 21, 2016, at 1:38 PM, wcopeland [email protected] wrote:

Just checking in. Has there been any solution for this?

I saw a GitHub issue that seems to have the same problem but no good solution yet:

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

On Thursday, December 10, 2015 at 12:41:15 AM UTC-8, Ingmar Nitze wrote:

Hi Bryan,

the system setup is the following

Win 7

Python 2.7.9

bokeh 0.10.0

The application is actually developed from the sliders example, but with loads of additions.

On Thursday, December 10, 2015 at 5:44:15 AM UTC+1, Bryan Van de ven wrote:

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

On Dec 8, 2015, at 9:27 AM, Ingmar Nitze [email protected] wrote:

Hi Bryan,
thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )
The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column ‘y’ gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there’s something else that’s also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):
“”"
Function changes the y-value according to the selected index from RadioButton Panel
Update of source data and background plots
:return:
“”"

update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!

layer = self.radio_btns.labels[self.radio_btns.active]
y = np.array(self.source_base.data[layer], np.float32).copy()

self.source.data = dict(x=self.source.data[‘x’],
y=y,
y_mod=self.source.data[‘y_mod’],
yr=self.source.data[‘yr’],
mth=self.source.data[‘mth’],
dt=self.source.data[‘dt’],
y_mod_new=self.source.data[‘y_mod_new’],
y_diff=self.source.data[‘y_diff’],
datestr=self.source.data[‘datestr’],
flist=self.source.data[‘flist’])

<Auto Generated Inline Image 1.png>

<Auto Generated Inline Image 2.png>

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:
Hi Ingmar,

It’s possible this is a bug, I’m not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze [email protected] wrote:

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(
tooltips=[(“Value”, “@y{0.000}”),
(“Date:”, “@datestr”),
(“File:”,“@flist”),
],
line_policy=“none”,
point_policy=“snap_to_data”,
names = [‘scatter_active’],
name=‘hover_tool’
)
self.plot.add_tools(hover)


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/002dea87-f979-4758-9248-3b2eb6ac67fe%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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>


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/906ceea9-9cf0-4bbb-a85e-e894beb3e448%40continuum.io.

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

Hi,

Thanks for taking the time to work up an example. I did try it right quick, and at least for me, I am seeing that there can be error in the python code when a selection is made:

2016-04-21 17:11:27,068 error handling message Message 'PATCH-DOC' (revision 1): UnboundLocalError("local variable 'selected' referenced before assignment",)

I suspect this is because the select tool triggers continuously, there is an option that you might want to set that makes it trigger only when the mouse up event occurs.

Also, I not even then that it the hover does work on some of the heatmap (image hopefully shows up below).

In any case yes please make an issue and we can investigate further.

Thanks,

Bryan

···

On Apr 21, 2016, at 4:53 PM, wcopeland [email protected] wrote:

I am using Bokeh 0.11.1. I mocked up some code that reproduces the error: http://pastebin.com/g2Vn4dag

This script basically refreshes a heat map (HEAT_DATA) based on coordinates selected on a scatter plot (SCATTER_DATA). Selections are made using common indices.

bokeh server testScript.py

The HoverTool works perfectly fine for the heat map to start. Once you select a few points in the scatter plot, the heat map refreshes, but the HoverTool does not show data when hovering over most rectangles in the refreshed heat map.

I will open a GitHub issue as well.

Cheers!

On Thursday, April 21, 2016 at 12:42:00 PM UTC-7, Bryan Van de ven wrote:
Looking at that issue, the code refers to the old (and now completely removed server). Are you saying you have experienced that problem or a similar problem with the new server as of 0.11 release? If so, can you file a new GH issue with code to reproduce (I’m going to close that issue since the old server no longer exists).

Alternatively, if you mean to say that you are using 0.10 and are asking if there will be a fix for the old server, I am afraid the answer is no, we simply do not have the resources to try and maintain any aspect of the old server. If this is the case I encourage you to update, the new server is vastly more stable, performant, and easier to use. The new server has already seen more use and adoption in a two months than the old server saw in two years, and is the only thing that will be supported going forward.

Thanks,

Bryan

On Apr 21, 2016, at 1:38 PM, wcopeland <wilbert…@gmail.com> wrote:

Just checking in. Has there been any solution for this?

I saw a GitHub issue that seems to have the same problem but no good solution yet:
https://github.com/bokeh/bokeh/issues/2584

On Thursday, December 10, 2015 at 12:41:15 AM UTC-8, Ingmar Nitze wrote:
Hi Bryan,
the system setup is the following

Win 7
Python 2.7.9
bokeh 0.10.0

The application is actually developed from the sliders example, but with loads of additions.

On Thursday, December 10, 2015 at 5:44:15 AM UTC+1, Bryan Van de ven wrote:

I had thought perhaps you were updating from a CustomJS callback in the client, but evidently not. What is the context of this example, is this a Bokeh 0.11 dev build with the new server?

Bryan

On Dec 8, 2015, at 9:27 AM, Ingmar Nitze [email protected] wrote:

Hi Bryan,
thanks for the quick reply

The data update is triggered by a Click on a radio Button (line 324, lines 351 ff.) with the function below ( change_data_index() )
The ColumnDataSource.data gets completely overwritten/replaced with the same structure. In theory, only column ‘y’ gets overwritten, but practically the update (taken by the scatterplot) only works on overwriting .data entirely. (lines 431 ff.)

I guess there’s something else that’s also changing, which is linked to the hover, but not to other objects within the plot.

Weird enough, I am running the same data replacement strategy on Slider changes, where the Hover tools stays active (lines 469 ff.). It only disappears after data changes via RadioButton (see Figures).

Code and 2 Figures are attached

Thanks for your effort

lines 431 ff.

def change_data_index(self):
“”"
Function changes the y-value according to the selected index from RadioButton Panel
Update of source data and background plots
:return:
“”"

update input-data - !!! only works for complete replacement of source dataset (Bug?) !!!

layer = self.radio_btns.labels[self.radio_btns.active]
y = np.array(self.source_base.data[layer], np.float32).copy()

self.source.data = dict(x=self.source.data[‘x’],
y=y,
y_mod=self.source.data[‘y_mod’],
yr=self.source.data[‘yr’],
mth=self.source.data[‘mth’],
dt=self.source.data[‘dt’],
y_mod_new=self.source.data[‘y_mod_new’],
y_diff=self.source.data[‘y_diff’],
datestr=self.source.data[‘datestr’],
flist=self.source.data[‘flist’])

<Auto Generated Inline Image 1.png>

<Auto Generated Inline Image 2.png>

On Tuesday, December 8, 2015 at 2:44:39 PM UTC+1, Bryan Van de ven wrote:
Hi Ingmar,

It’s possible this is a bug, I’m not sure offhand. How exactly are you updating the data source? Can you provide more code? Ideally a minimal complete example that reproduces the issue will leave the best chance for debugger or offering advice.

Thanks,

Bryan

On Dec 8, 2015, at 7:24 AM, Ingmar Nitze [email protected] wrote:

Hi,
I have an interactive scatterplot, running with a bokeh-server in the background, which is linked to a ColumnDatasource. There is a Hover Tool available, which shows some values of the dataset. The Hovertool is linked to the scatterplot via “names”.
At this stage, everything works as expected.

The contents of the datasource can be changed interactively, loading another dataset, while clicking a button.
After changing the input dataset (with the same column structure), the scatterplot gets updated. However, now the Hovertool seems to be inactive, showing no reaction anymore.

Any idea for a solution? This issue has been a real headache for me so far.
If you need more information, feel free to ask.

Thanks in advance
Ingmar

self.plot.scatter(x=‘dt’, y=‘y’, source=self.source, alpha=0.3, name=‘scatter_active’)

hover = HoverTool(
tooltips=[(“Value”, “@y{0.000}”),
(“Date:”, “@datestr”),
(“File:”,“@flist”),
],
line_policy=“none”,
point_policy=“snap_to_data”,
names = [‘scatter_active’],
name=‘hover_tool’
)
self.plot.add_tools(hover)


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/002dea87-f979-4758-9248-3b2eb6ac67fe%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/d73d5afd-0328-4041-9c0f-2f150ff5efb2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<sliders_app.py><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png>


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/906ceea9-9cf0-4bbb-a85e-e894beb3e448%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/fc8934fb-b41c-4d43-91ee-52ab07211eaf%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.