import plotly.express as px import marimo as mo from vega_datasets import data import polars as pl # or pandas _plot = px.scatter( data.cars(), x="Horsepower", y="Miles_per_Gallon", color="Origin" ) plot = mo.ui.plotly(_plot) # in another cell df = pl.DataFrame(plot.value) df