Hello,
I am trying to follow the example here with selecting/ unselecting glyphs and applying it image glyphs. I am using image_url, which works btw, but the selection doesn’t. Here is the code snippet,
///
from bokeh.plotting import figure, show, output_file
from bokeh.models.glyphs import ImageURL
from bokeh.models import Plot
output_file(‘testBokeh.html’)
urls = [‘images/testImage.png’] * 9
x = [1, 2, 3, 4, 5, 6, 7, 8, 9]
plot = figure(x_range=(0,10), y_range=(0,10), plot_width=512, plot_height=512)
renderer = plot.image_url(urls, x, x, w=0.5, h=0.5, anchor=“bottom_left”)
selected_glyph = ImageURL(url=‘images/testImage.png’, x=0, y=0, w=0.5, h=0.5, anchor=“bottom_left”, global_alpha=0.5)
nonselected_glyph = ImageURL(url=‘images/testImage.png’, x=0, y=0, w=0.5, h=0.5, anchor=“bottom_left”, global_alpha=0.2)
renderer.selection_glyph = selected_glyph
renderer.nonselection_glyph = nonselected_glyph
show(plot)
///
Any ideas what I may be doing wrong?
Thanks!