Skip to content

Commit 84bf88a

Browse files
committed
Add marimo nb
1 parent dad3dea commit 84bf88a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/notebooks/marimo.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import marimo
2+
3+
__generated_with = "0.13.15"
4+
app = marimo.App(width="medium")
5+
6+
7+
@app.cell
8+
def _():
9+
import marimo as mo
10+
return (mo,)
11+
12+
13+
@app.cell
14+
def _():
15+
from vitessce import VitessceConfig
16+
from example_configs import dries as dries_config
17+
return VitessceConfig, dries_config
18+
19+
20+
@app.cell
21+
def _(VitessceConfig, dries_config, mo):
22+
vc = VitessceConfig.from_dict(dries_config)
23+
vw = mo.ui.anywidget(vc.widget())
24+
vw
25+
return (vw,)
26+
27+
28+
@app.cell(hide_code=True)
29+
def _(mo):
30+
mo.md(r"""As you interact with the widget above, watch as the Vitessce configuration below dynamically updates. For instance, as you zoom in the scatterplot, check the value of `coordinationSpace.embeddingZoom`""")
31+
return
32+
33+
34+
@app.cell
35+
def _(vw):
36+
vw.config
37+
return
38+
39+
40+
@app.cell
41+
def _(vw):
42+
vw.config["coordinationSpace"]["embeddingZoom"]
43+
return
44+
45+
46+
@app.cell
47+
def _():
48+
return
49+
50+
51+
if __name__ == "__main__":
52+
app.run()

0 commit comments

Comments
 (0)