I'm trying to create a small marimo app that shows 2 scatterplots next to each other. These are just 2 simple SVGs, using svg.py. (That's important because the app is just a proof-of-principle for more complex novel visualisations later). The setup is the following:
- I have an array of datapoints with the properties
id
, x
, y
and z
. - I create 2 SVGs based on that array (let's say one plots
x
vs y
, the other plots x
vs z
). - When hovering over a circle in 1 plot, I can get the ID of that circle.
- I want to have the circle with the same ID but in the second plot to react as well.
What is a good "marimo" way to approach this? Basically, both plots can be the input for the "selected" ID, and both should change when that ID changes.