File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # coding: utf-8
3
+
4
+ # # Load real-world data and verify that functions run on it
5
+ # ### How to use this script
6
+ # - If you need it interactive, convert it to a jupyter notebook with `p2j` -> `p2j test_sandbox_data.py`
7
+ # - You can use `jupyter nbconvert --to python test_sandbox_data.ipynb` to convert it back
8
+ # - Otherwise run it from the CLI and verify that the plots are okay
9
+
10
+ # In[12]:
11
+
12
+
13
+ get_ipython ().run_line_magic ("load_ext" , "autoreload" )
14
+ get_ipython ().run_line_magic ("autoreload" , "2" )
15
+ DATA_DIR = "/Users/tim.treis/Documents/GitHub/spatialdata-sandbox/"
16
+
17
+
18
+ # In[13]:
19
+
20
+
21
+ import matplotlib .pyplot as plt
22
+ import numpy as np
23
+ import pandas as pd
24
+ import spatialdata as sd
25
+
26
+ import spatialdata_plot
27
+
28
+
29
+ # In[15]:
30
+
31
+
32
+ # Mibi
33
+
34
+ sdata = sd .read_zarr (DATA_DIR + "mibitof/data.zarr" )
35
+ sdata .pl .render_images ().pl .render_labels ().pl .show ()
36
+
37
+ plt .savefig ("mibi.png" )
38
+
39
+
40
+ # In[16]:
41
+
42
+
43
+ # Visium
44
+
45
+ sdata = sd .read_zarr (DATA_DIR + "visium/data.zarr" )
46
+ sdata .pl .render_images ().pl .render_shapes ().pl .show (width = 12 , height = 12 )
47
+
48
+ plt .savefig ("visium.png" )
You can’t perform that action at this time.
0 commit comments