☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

select the desired area in the image

Community Supportbokeh
Aleksei3012
Aleksei3012

Hello! I am new to python and bokeh. My task is to select the desired section of the matrix data and summarize it (I choose the section myself).
To render the matrix, I use the image function.
There are some old posts on this topic. Does bokeh already have a widget for this?

⌁   Link to post
Bryan
Bryan

The short answer is no. There are almost certainly individual pieces and feature you could put together yourself, but you will have to describe the exact interaction you are hoping to achieve in greater detail, as the current description is too vague to offer any concrete advice on.

⌁   Link to post
Bryan
Bryan

You can certainly respond to selection events with either JavaScript code (in a pure standalone HTML file) or with Python code (requires running a Bokeh server application). It’s not clear which of those you want. It’s not clear if you want the index coordinates of the matrix as the selection, or if you want the data coordinates of the selection geometry. Does “open a window” literally mean raise a separate browser window? AFAIK you would have to pass a real URL to window.open to do that. If that’s the case I think you’d have to run a Bokeh server application and pass some encoded data as an HTTP argument in the URL to condition what exactly to render on the new page (i.e. based on the selection somehow).

⌁   Link to post

End of archived discussion · Replies are disabled