AllenNeuralDynamics / foraging-behavior-browser

Foraging behavior browser (streamlit)
https://foraging-behavior-browser.streamlit.app/
MIT License
1 stars 2 forks source link

Put figures in hover message #85

Open hanhou opened 2 weeks ago

hanhou commented 2 weeks ago

In the Streamlit app, I'm trying to embed figures in hover tooltips so that the user doesn't have to click on the scatter plot to see the corresponding pre-generated figures, which will greatly enhance the interactivity. I've just figured out how to do this using Bokeh. Here is a toy example (code):

session_plotly

Steps:

hanhou commented 2 weeks ago

@dyf could you help with the first step?

hanhou commented 2 weeks ago

@dyf could you help with the first step?

@jtyoung84 @yosefmaru helped me test it in the `dev' environment by setting the subfolder publicly accessible. It works as I wanted!

session_plotly

Here is how I get URLs of the figures:

https://github.com/AllenNeuralDynamics/foraging-behavior-browser/blob/301e883d63c37c6fdd9f6cdc61760a5df453a3de/code/pages/4_try_bokeh.py#L25