Hi,
I am just learning Bokeh and struggling with some things. For example, how do I get the hover tooltip to show up on a HeatMap? I tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
I am also having this problem. It appears (i’m very very new to Bokeh) that the default hover functionality present in version 10, is now longer present in version 11.1. Or (more realistically) I haven’t the faintest clue how to get it working. I would also appreciate some advice on this.
···
On Saturday, June 18, 2016 at 12:17:00 PM UTC-4, Joel wrote:
Hi,
I am just learning Bokeh and struggling with some things. For example, how do I get the hover tooltip to show up on a HeatMap? I tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('[https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv](https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv)')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
I am also having this problem. It appears (i'm very
very new to Bokeh) that the default hover functionality present
in version 10, is now longer present in version 11.1. Or (more
realistically) I haven’t the faintest clue how to get it
working. I would also appreciate some advice on this.
On Saturday, June 18, 2016 at 12:17:00 PM UTC-4, Joel wrote:
Hi,
I am just learning Bokeh and struggling with some
things. For example, how do I get the hover tooltip to
show up on a HeatMap? I tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('[https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv](https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv)')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
I am also having this problem. It appears (i'm very
very new to Bokeh) that the default hover functionality present
in version 10, is now longer present in version 11.1. Or (more
realistically) I haven’t the faintest clue how to get it
working. I would also appreciate some advice on this.
On Saturday, June 18, 2016 at 12:17:00 PM UTC-4, Joel wrote:
Hi,
I am just learning Bokeh and struggling with some
things. For example, how do I get the hover tooltip to
show up on a HeatMap? I tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('[https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv](https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv)')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
Would you have any insight into the ColumnDataSource class?
The default hover values are not what I need, and I am attempting to change them. However when I make use of the ColumnDataSource class as mentioned in the Bokeh documentation (under ‘specify tools’ which you kindly linked), I receive a “TypeError: ‘NoneType’ object is not subscriptable” error when calling the HeatMap chart. I am stumped as to why it is doing this, as the HeatMap is generated just fine (but without the proper hover information) when I pass the straight df (not the ColumnDataSource object). I appears I am not understanding the role that ColumnDataSource plays, nor how to properly make use of it.
I am looking for the hover tool to display:
Branch: Branch Name
Exceptions: Exceptions Value (#)
I would appreciate any help you could provide.
from bokeh.plotting import figure, output_notebook, show, ColumnDataSource
I am also having this problem. It appears (i'm very
very new to Bokeh) that the default hover functionality present
in version 10, is now longer present in version 11.1. Or (more
realistically) I haven’t the faintest clue how to get it
working. I would also appreciate some advice on this.
On Saturday, June 18, 2016 at 12:17:00 PM UTC-4, Joel wrote:
Hi,
I am just learning Bokeh and struggling with some
things. For example, how do I get the hover tooltip to
show up on a HeatMap? I tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('[https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv](https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv)')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
Would you have any insight into the ColumnDataSource class?
The default hover values are not what I need, and I am
attempting to change them. However when I make use of the
ColumnDataSource class as mentioned in the Bokeh documentation
(under ‘specify tools’ which you kindly linked), I receive a
“TypeError: ‘NoneType’ object is not subscriptable” error when
calling the HeatMap chart. I am stumped as to why it is doing
this, as the HeatMap is generated just fine (but without the
proper hover information) when I pass the straight df (not the
ColumnDataSource object). I appears I am not understanding the
role that ColumnDataSource plays, nor how to properly make use
of it.
(i’m very very new to Bokeh) that the default hover
functionality present in version 10, is now longer
present in version 11.1. Or (more realistically) I
haven’t the faintest clue how to get it working. I
would also appreciate some advice on this.
On Saturday, June 18, 2016 at 12:17:00 PM UTC-4, Joel
wrote:
Hi,
I am just learning Bokeh and struggling with
some things. For example, how do I get the
hover tooltip to show up on a HeatMap? I
tried:
import pandas as pd
from bokeh.charts import HeatMap
from bokeh.plotting import output_file, show
from bokeh.models import HoverTool
tips = pd.read_csv('[https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv](https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/tips.csv)')
hm = HeatMap(tips, x='sex', y='day', values='total_bill', stat='mean', hover_tool=True)
output_file("heatmap-tooltip.html", title="heatmap-tooltip")
show(hm)
But there is no tooltip, neither in the created file or in the Jupyter-notebook (I tried with output_notebook()).
I also tried briefly with adding tools=['hover'], but it did not work either. I am not sure I am doing this correctly as it seem like the syntax here differs from that used in bokeh.figure, where I could specify hover as a string in addition to as a list.
I would prefer to use HeatMap over the lower level examples in the bokeh gallery. Any pointers on how to fix this are much appreciated!
I have spent some time to recreate HeatMaps using the examples provided without much issue. However, the examples do not explicitly specify how to add custom hover information to a HeatMap. I have read the user guide and I just can't seem to figure it out.
If I pass the df to HeatMap (without passing it first to ColumnDataSource) it partially works in that it shows the interval the value is part of. Apparently HeatMap creates another column to the data frame with intervals (I'm assuming to guide the colouring) using the same name as the original values column. It then renames the original values column by appending '_values' to the end of the name. I have tried to change the hover tool to point to the '_values' column to show the values, but that does not work.
If I pass the ColumnDataSource object, I get the same error as above.
I am having no problems creating custom over information with other chart types.
If anyone could help I would greatly appreciate it!