source.data['image'] = RGB_image[:, :, (idx)]
p.image([source.data['image'][::-1, :] - 1], x=0, y=0, dh=[ny], dw=[nx],
    palette=Greys9, source=source)
Interactive slider to vary slice used in Bokeh image plot