from bokeh.plotting import ColumnDataSource, figure, output_file, show
from bokeh.models.callbacks import CustomJS
def interactive(Y,imgList,dataset,tc):
output_file("Scatter Plot Images over the Image Error distribution of Dataset {} {} .html".format(dataset,tc))
source = ColumnDataSource(data=dict(
x = Y,
y=Y,
imgs=imgList,
))
TOOLTIPS = """
<div>
<div>
<img
src="@imgs" height="200" alt="@imgs" width="200"
style="float: left; margin: 0px 15px 15px 0px;"
border="2"
></img>
</div>
</div>
"""
p = figure(plot_width=1440, plot_height=800, tooltips=TOOLTIPS,
title="{} {}".format(dataset,tc))
p.circle('x', 'y', size=5, source=source)
# execute a callback whenever the plot canvas is tapped
show(p)
This does the work, but the images are shown vertically all once. I wish to show few images, and should be scroll able on horizontal axis.
Please do let me know how to achieve this.