Jupyter Python Notebook: interactive scatter plot in which each data point is associated with its own graph?
<p>Consider a set of data points. Each data point consists of two numbers and two  arrays. For example, the two numbers might be the values of two parameters and the two arrays might represent associated time course data. I want to produce an inline scatter plot in a Jupyter Python Notebook in which I correlate the two numbers against each other. Additionally, I want the scatter plot to be interactive such that, when I hover the cursor over a data point, a second graph appears in which the two arrays are plotted against each other. How should I do it? </p>

<p><a href="http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/gallery/texas.ipynb" rel="nofollow">Here</a> is an example in Bokeh that is close to what I want but it only shows a floating text box associated with each point instead of a graph. I should say that I would actually prefer if the graph didn't float but instead was anchored adjacent to the scatter plot. </p>

<p>Thanks. </p>

<p>"Defining callbacks" from the <a href="http://bokeh.pydata.org/en/0.10.0/docs/user_guide/interaction.html#defining-callbacks" rel="nofollow">Bokeh documentation</a> might help. Not convenient, not perfect, but can achieve what you described.</p>

<pre><code>from bokeh.models import ColumnDataSource, OpenURL, TapTool
from bokeh.plotting import figure, output_file, show

output_file("openurl.html")

p = figure(plot_width=400, plot_height=400,
           tools="tap", title="Click the Dots")

source = ColumnDataSource(data=dict(
    x=[1, 2, 3, 4, 5],
    y=[2, 5, 8, 2, 7],
    color=["navy", "orange", "olive", "firebrick", "gold"]
    ))

p.circle('x', 'y', color='color', size=20, source=source)

url = "http://www.colors.commutercreative.com/@color/"
taptool = p.select(type=TapTool)
taptool.callback = OpenURL(url=url)

show(p)
</code></pre>

python visualization jupyter interactive bokeh