Repository navigation
Replies: 1 comment
|
Two things are going on here (checked with marimo 0.25.2):
brush = alt.selection_interval(encodings=["x", "y"])
points = alt.Chart(df_scatter).mark_point(color="blue").encode(
x="actuals", y="preds",
).add_params(brush)
line = alt.Chart(line_df).mark_line(color="white", strokeDash=[4, 4]).encode(x="x", y="y")
chart_ui = mo.ui.altair_chart(
(points + line).properties(title=f"Actual vs Predicted\nMAPE={mape:.2f}%, R²={r2:.3f}")
)
chart_ui# next cell
selected = chart_ui.apply_selection(df_scatter)
mo.vstack([chart_ui, mo.ui.table(selected)])I tested this by simulating a brush over |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm not able to select points from a scatterplot if it is combined with another line plot:
New cell:
I don't know how to access the value in the 'alt_chart' or 'chart_ui' it does not work.
All reactions