Get help from the marimo community

Updated 3 months ago

Interactive plots with Plotly

I'm looking for a way to generate a plot based on a plotly canvas. I want to create a surface, by clicking on the canvas so that vertices of that surface can be defined. Later, I want to extract the vertices, to be able to fine tune them in my UI. Is that something I could do with Marimo?
A
r
10 comments
For mo.ui.plotly_chart, the only interaction we support out-of-the-box is selecting groups of points. See the docs for a demo/usage: https://docs.marimo.io/guides/plotting.html#plotly
You might be able to achieve what you want using Plotly's click event API directly. I haven't worked with it before, so YMMV. https://plotly.com/python/click-events/
Ahhh! I just spent about two hours trying to make an interactive plotly bar chart work. Any way this could be added to the documentation more explicitly? For the dumb folks like me ๐Ÿ™‚
Ah, sorry about that! Yes, I can improve the documentation to make that more clear. Thanks for the suggestion
If it helps, altair bar charts should be selectable
We're improving our docs. Thanks again for the suggestion, and sorry you lost a couple hours!

https://github.com/marimo-team/marimo/pull/2510
@Akshay I'm absolutely loving the tool. You've got a new promoter with me! The SQL integration is a game changer.
Woohoo! Thank you so much!
Iโ€™m in the process of building out more bite size examples for SQL. Realize itโ€™s not totally obvious how to connect to postgres, etc
Csv import was exactly what I needed. Everything else regarding duckdb and the handoffs to pythonwas straightforward for me!
Add a reply
Sign up and join the conversation on Discord