Skip to content

Commit 17449da

Browse files
committed
Preview for PR #20 dc89b67
1 parent 504b388 commit 17449da

24 files changed

Lines changed: 171 additions & 88 deletions

pr-20/_sources/notebooks/examples/colouring_points.ipynb

Lines changed: 93 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"\n",
1919
"We use the real Xenium `cells` dataset from `squidpy` (its `transcripts` element), downloaded and\n",
2020
"cached on first use. Point colouring uses the **matplotlib backend** (`method=\"matplotlib\"`) so every\n",
21-
"point keeps its own colour; `render_points` otherwise switches to datashader for very large sets — see\n",
22-
"the *Point density maps* and *Speeding up rendering* notebooks."
21+
"point keeps its own colour; `render_points` otherwise switches to datashader above ~10,000 points, which aggregates them and so\n",
22+
"cannot keep a distinct colour per point — see the *Point density maps* and *Speeding up rendering*\n",
23+
"notebooks."
2324
]
2425
},
2526
{
@@ -36,10 +37,10 @@
3637
"id": "5817284b",
3738
"metadata": {
3839
"execution": {
39-
"iopub.execute_input": "2026-08-18T22:55:02.428168Z",
40-
"iopub.status.busy": "2026-08-18T22:55:02.428050Z",
41-
"iopub.status.idle": "2026-08-18T22:55:08.716436Z",
42-
"shell.execute_reply": "2026-08-18T22:55:08.715732Z"
40+
"iopub.execute_input": "2026-08-19T03:34:33.702060Z",
41+
"iopub.status.busy": "2026-08-19T03:34:33.701942Z",
42+
"iopub.status.idle": "2026-08-19T03:34:44.267379Z",
43+
"shell.execute_reply": "2026-08-19T03:34:44.266804Z"
4344
}
4445
},
4546
"outputs": [
@@ -98,6 +99,56 @@
9899
"sdata"
99100
]
100101
},
102+
{
103+
"cell_type": "markdown",
104+
"id": "71aaf0d7",
105+
"metadata": {},
106+
"source": [
107+
"The `cells` dataset is a small (~3 MB) crop of a real 10x **Xenium** breast-cancer section,\n",
108+
"cached locally after the first download. The colouring below draws on the columns of its\n",
109+
"`transcripts` points element:"
110+
]
111+
},
112+
{
113+
"cell_type": "code",
114+
"execution_count": 2,
115+
"id": "6b3a72dc",
116+
"metadata": {
117+
"execution": {
118+
"iopub.execute_input": "2026-08-19T03:34:44.269152Z",
119+
"iopub.status.busy": "2026-08-19T03:34:44.269024Z",
120+
"iopub.status.idle": "2026-08-19T03:34:44.271734Z",
121+
"shell.execute_reply": "2026-08-19T03:34:44.271293Z"
122+
}
123+
},
124+
"outputs": [
125+
{
126+
"data": {
127+
"text/plain": [
128+
"['x',\n",
129+
" 'y',\n",
130+
" 'z',\n",
131+
" 'feature_name',\n",
132+
" 'cell_id',\n",
133+
" 'fov_name',\n",
134+
" 'codeword_index',\n",
135+
" 'qv',\n",
136+
" 'transcript_id',\n",
137+
" 'is_gene',\n",
138+
" 'codeword_category',\n",
139+
" 'nucleus_distance',\n",
140+
" 'overlaps_nucleus']"
141+
]
142+
},
143+
"execution_count": 2,
144+
"metadata": {},
145+
"output_type": "execute_result"
146+
}
147+
],
148+
"source": [
149+
"list(sdata[\"transcripts\"].columns)"
150+
]
151+
},
101152
{
102153
"cell_type": "markdown",
103154
"id": "997ac2bb",
@@ -111,14 +162,14 @@
111162
},
112163
{
113164
"cell_type": "code",
114-
"execution_count": 2,
165+
"execution_count": 3,
115166
"id": "10814cf1",
116167
"metadata": {
117168
"execution": {
118-
"iopub.execute_input": "2026-08-18T22:55:08.718347Z",
119-
"iopub.status.busy": "2026-08-18T22:55:08.718197Z",
120-
"iopub.status.idle": "2026-08-18T22:55:09.502886Z",
121-
"shell.execute_reply": "2026-08-18T22:55:09.502377Z"
169+
"iopub.execute_input": "2026-08-19T03:34:44.273223Z",
170+
"iopub.status.busy": "2026-08-19T03:34:44.273107Z",
171+
"iopub.status.idle": "2026-08-19T03:34:45.082341Z",
172+
"shell.execute_reply": "2026-08-19T03:34:45.081737Z"
122173
}
123174
},
124175
"outputs": [
@@ -150,14 +201,14 @@
150201
},
151202
{
152203
"cell_type": "code",
153-
"execution_count": 3,
204+
"execution_count": 4,
154205
"id": "5dcf7754",
155206
"metadata": {
156207
"execution": {
157-
"iopub.execute_input": "2026-08-18T22:55:09.504957Z",
158-
"iopub.status.busy": "2026-08-18T22:55:09.504838Z",
159-
"iopub.status.idle": "2026-08-18T22:55:09.971854Z",
160-
"shell.execute_reply": "2026-08-18T22:55:09.971254Z"
208+
"iopub.execute_input": "2026-08-19T03:34:45.084350Z",
209+
"iopub.status.busy": "2026-08-19T03:34:45.084224Z",
210+
"iopub.status.idle": "2026-08-19T03:34:45.580457Z",
211+
"shell.execute_reply": "2026-08-19T03:34:45.579838Z"
161212
}
162213
},
163214
"outputs": [
@@ -197,14 +248,14 @@
197248
},
198249
{
199250
"cell_type": "code",
200-
"execution_count": 4,
251+
"execution_count": 5,
201252
"id": "b1c3160f",
202253
"metadata": {
203254
"execution": {
204-
"iopub.execute_input": "2026-08-18T22:55:09.973713Z",
205-
"iopub.status.busy": "2026-08-18T22:55:09.973609Z",
206-
"iopub.status.idle": "2026-08-18T22:55:10.444836Z",
207-
"shell.execute_reply": "2026-08-18T22:55:10.444356Z"
255+
"iopub.execute_input": "2026-08-19T03:34:45.582257Z",
256+
"iopub.status.busy": "2026-08-19T03:34:45.582150Z",
257+
"iopub.status.idle": "2026-08-19T03:34:46.080758Z",
258+
"shell.execute_reply": "2026-08-19T03:34:46.080053Z"
208259
}
209260
},
210261
"outputs": [
@@ -244,19 +295,20 @@
244295
"## 4. Subsetting categories — `groups` and `na_color`\n",
245296
"\n",
246297
"`groups` restricts colouring to selected categories; everything else is drawn in `na_color`. Here we\n",
247-
"pick a few marker genes and grey out the rest."
298+
"pick a few marker genes and grey out the rest. Omit `na_color` and the non-matching points are hidden\n",
299+
"entirely instead of greyed."
248300
]
249301
},
250302
{
251303
"cell_type": "code",
252-
"execution_count": 5,
304+
"execution_count": 6,
253305
"id": "d90642f4",
254306
"metadata": {
255307
"execution": {
256-
"iopub.execute_input": "2026-08-18T22:55:10.447033Z",
257-
"iopub.status.busy": "2026-08-18T22:55:10.446917Z",
258-
"iopub.status.idle": "2026-08-18T22:55:10.814005Z",
259-
"shell.execute_reply": "2026-08-18T22:55:10.813480Z"
308+
"iopub.execute_input": "2026-08-19T03:34:46.082524Z",
309+
"iopub.status.busy": "2026-08-19T03:34:46.082396Z",
310+
"iopub.status.idle": "2026-08-19T03:34:46.473842Z",
311+
"shell.execute_reply": "2026-08-19T03:34:46.473257Z"
260312
}
261313
},
262314
"outputs": [
@@ -294,14 +346,14 @@
294346
},
295347
{
296348
"cell_type": "code",
297-
"execution_count": 6,
349+
"execution_count": 7,
298350
"id": "092260ad",
299351
"metadata": {
300352
"execution": {
301-
"iopub.execute_input": "2026-08-18T22:55:10.815615Z",
302-
"iopub.status.busy": "2026-08-18T22:55:10.815495Z",
303-
"iopub.status.idle": "2026-08-18T22:55:11.308237Z",
304-
"shell.execute_reply": "2026-08-18T22:55:11.307597Z"
353+
"iopub.execute_input": "2026-08-19T03:34:46.475950Z",
354+
"iopub.status.busy": "2026-08-19T03:34:46.475813Z",
355+
"iopub.status.idle": "2026-08-19T03:34:46.985787Z",
356+
"shell.execute_reply": "2026-08-19T03:34:46.985061Z"
305357
}
306358
},
307359
"outputs": [
@@ -333,9 +385,10 @@
333385
"- A **categorical** `color=` column draws a legend; set colours with `palette`, subset with `groups`,\n",
334386
" and style the remainder with `na_color`.\n",
335387
"- `size` and `alpha` tune the markers.\n",
336-
"- Per-point colouring uses the matplotlib backend; for millions of points switch to datashader\n",
337-
" (`method=\"datashader\"`, or `density=True`) — see the *Point density maps* and *Speeding up\n",
338-
" rendering* notebooks."
388+
"- Per-point colouring uses the matplotlib backend; `render_points` auto-switches to datashader above\n",
389+
" 10,000 points (which drops per-point colour), so pass `method=\"matplotlib\"` to force it — or reach\n",
390+
" for datashader deliberately (`method=\"datashader\"`, or `density=True`) for millions of points. See\n",
391+
" the *Point density maps* and *Speeding up rendering* notebooks."
339392
]
340393
},
341394
{
@@ -348,14 +401,14 @@
348401
},
349402
{
350403
"cell_type": "code",
351-
"execution_count": 7,
404+
"execution_count": 8,
352405
"id": "b23aeab2",
353406
"metadata": {
354407
"execution": {
355-
"iopub.execute_input": "2026-08-18T22:55:11.310421Z",
356-
"iopub.status.busy": "2026-08-18T22:55:11.310312Z",
357-
"iopub.status.idle": "2026-08-18T22:55:11.343903Z",
358-
"shell.execute_reply": "2026-08-18T22:55:11.343228Z"
408+
"iopub.execute_input": "2026-08-19T03:34:46.987964Z",
409+
"iopub.status.busy": "2026-08-19T03:34:46.987836Z",
410+
"iopub.status.idle": "2026-08-19T03:34:47.020451Z",
411+
"shell.execute_reply": "2026-08-19T03:34:47.019656Z"
359412
}
360413
},
361414
"outputs": [

pr-20/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '0.1.dev1+g375c17330.d20260818',
2+
VERSION: '0.1.dev1+g375c17330.d20260819',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

pr-20/api.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
5858

59-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
59+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
6060
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6161
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6262
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -71,7 +71,7 @@
7171
<link rel="prev" title="Colouring points in spatialdata-plot" href="notebooks/examples/colouring_points.html" />
7272
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7373
<meta name="docsearch:language" content="en"/>
74-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
74+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
7575

7676

7777
<script src="_static/searchtools.js"></script>

pr-20/changelog.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
5858

59-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
59+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
6060
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6161
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6262
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -71,7 +71,7 @@
7171
<link rel="prev" title="Plotting (.pl)" href="plotting.html" />
7272
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7373
<meta name="docsearch:language" content="en"/>
74-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
74+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
7575

7676

7777
<script src="_static/searchtools.js"></script>

pr-20/contributing.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
5858

59-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
59+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
6060
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6161
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6262
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -71,7 +71,7 @@
7171
<link rel="prev" title="Changelog" href="changelog.html" />
7272
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7373
<meta name="docsearch:language" content="en"/>
74-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
74+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
7575

7676

7777
<script src="_static/searchtools.js"></script>

pr-20/gallery.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
5858

59-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
59+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
6060
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6161
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6262
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -71,7 +71,7 @@
7171
<link rel="prev" title="spatialdata-plot: rich static plotting from SpatialData objects" href="index.html" />
7272
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7373
<meta name="docsearch:language" content="en"/>
74-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
74+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
7575

7676

7777
<script src="_static/searchtools.js"></script>

pr-20/genindex.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
4545
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
4646

47-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
47+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
4848
<script src="_static/doctools.js?v=fd6eb6e6"></script>
4949
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
5050
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -57,7 +57,7 @@
5757
<link rel="search" title="Search" href="search.html" />
5858
<meta name="viewport" content="width=device-width, initial-scale=1"/>
5959
<meta name="docsearch:language" content="en"/>
60-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
60+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
6161

6262

6363
<script src="_static/searchtools.js"></script>

pr-20/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" />
5858

59-
<script src="_static/documentation_options.js?v=6ef967b8"></script>
59+
<script src="_static/documentation_options.js?v=d505e5a5"></script>
6060
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6161
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6262
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -70,7 +70,7 @@
7070
<link rel="next" title="Gallery" href="gallery.html" />
7171
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7272
<meta name="docsearch:language" content="en"/>
73-
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260818" />
73+
<meta name="docsearch:version" content="0.1.dev1+g375c17330.d20260819" />
7474

7575

7676
<script src="_static/searchtools.js"></script>

0 commit comments

Comments
 (0)