Skip to content

Commit 7fe8590

Browse files
committed
Preview for PR #12 922bfa2
1 parent fcef10c commit 7fe8590

23 files changed

Lines changed: 94 additions & 50 deletions

pr-12/_images/scalebars.png

36.6 KB
Loading

pr-12/_sources/notebooks/tutorials/scalebars.ipynb

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"source": [
8484
"## 1. The one required piece: `scalebar_dx`\n",
8585
"\n",
86-
"`scalebar_dx` is the physical size of **one axes-unit**. The `blobs` image is indexed in pixels, so one axes-unit is one pixel; at our assumed resolution that is 0.5 µm. Pass that as `scalebar_dx`, and the unit it is measured in as `scalebar_units`. Note that `scalebar_dx` should be a float."
86+
"`scalebar_dx` is the physical size of **one axes-unit**. The `blobs` image is indexed in pixels, so one axes-unit is one pixel; at our assumed resolution that is 0.5 µm. Pass that as `scalebar_dx` (a float), and the unit it is measured in as `scalebar_units`."
8787
]
8888
},
8989
{
@@ -139,7 +139,7 @@
139139
"source": [
140140
"## 2. Units and auto-scaling\n",
141141
"\n",
142-
"`scalebar_units` is simply the unit your `scalebar_dx` is expressed in. matplotlib-scalebar then picks a human-friendly magnitude automatically: a bar spanning thousands of µm is shown in mm. The same image at a coarse 50 µm/pixel gives a bar labelled in mm:"
142+
"`scalebar_units` is simply the unit your `scalebar_dx` is expressed in. In the background, it uses [matplotlib-scalebar](https://pypi.org/project/matplotlib-scalebar/), which picks a human-friendly magnitude automaticallya bar spanning thousands of µm is relabelled in mm. Here the same image at a coarse 50 µm/pixel crosses that threshold:"
143143
]
144144
},
145145
{
@@ -181,7 +181,7 @@
181181
"source": [
182182
"## 3. Placement and appearance with `scalebar_params`\n",
183183
"\n",
184-
"`scalebar_params` is a dict forwarded **verbatim** to matplotlib-scalebar's `ScaleBar`, so every option it supports is available. The ones you will reach for most:\n",
184+
"`scalebar_params` is a dict forwarded to matplotlib-scalebar's `ScaleBar`, so every option it supports is available. The ones you will reach for most:\n",
185185
"\n",
186186
"- `location` — which corner (`\"lower right\"`, `\"upper left\"`, …).\n",
187187
"- `color` — bar and text colour (use white on dark images).\n",
@@ -348,10 +348,34 @@
348348
},
349349
{
350350
"cell_type": "code",
351-
"execution_count": null,
351+
"execution_count": 1,
352352
"id": "8737ae6c",
353353
"metadata": {},
354-
"outputs": [],
354+
"outputs": [
355+
{
356+
"name": "stdout",
357+
"output_type": "stream",
358+
"text": [
359+
"Python implementation: CPython\n",
360+
"Python version : 3.14.4\n",
361+
"IPython version : 9.13.0\n",
362+
"\n",
363+
"spatialdata : 0.7.3\n",
364+
"spatialdata_plot : 0.4.0\n",
365+
"matplotlib : 3.10.9\n",
366+
"matplotlib_scalebar: 0.9.0\n",
367+
"\n",
368+
"Compiler : Clang 20.1.8 \n",
369+
"OS : Darwin\n",
370+
"Release : 25.2.0\n",
371+
"Machine : arm64\n",
372+
"Processor : arm\n",
373+
"CPU cores : 8\n",
374+
"Architecture: 64bit\n",
375+
"\n"
376+
]
377+
}
378+
],
355379
"source": [
356380
"# ruff: noqa: F401, F811, I001, E402\n",
357381
"# fmt: off\n",
@@ -365,9 +389,9 @@
365389
],
366390
"metadata": {
367391
"kernelspec": {
368-
"display_name": "Python 3",
392+
"display_name": "sdata-plot-notebooks",
369393
"language": "python",
370-
"name": "python3"
394+
"name": "sdata-plot-notebooks"
371395
},
372396
"language_info": {
373397
"codemirror_mode": {
@@ -379,9 +403,9 @@
379403
"name": "python",
380404
"nbconvert_exporter": "python",
381405
"pygments_lexer": "ipython3",
382-
"version": "3.13.7"
406+
"version": "3.14.4"
383407
}
384408
},
385409
"nbformat": 4,
386410
"nbformat_minor": 5
387-
}
411+
}

pr-12/_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+g076eeaca6.d20260710',
2+
VERSION: '0.1.dev1+g076eeaca6.d20260712',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

pr-12/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=8878045cc6db502f8baf" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
5858

59-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
59+
<script src="_static/documentation_options.js?v=7748d207"></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="prev" title="Interactive region annotation" href="notebooks/examples/interactive_annotate.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+g076eeaca6.d20260710" />
73+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7474
</head>
7575

7676

pr-12/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=8878045cc6db502f8baf" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
5858

59-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
59+
<script src="_static/documentation_options.js?v=7748d207"></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="prev" title="Plotting (.pl)" href="plotting.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+g076eeaca6.d20260710" />
73+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7474
</head>
7575

7676

pr-12/contributing.html

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

60-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
60+
<script src="_static/documentation_options.js?v=7748d207"></script>
6161
<script src="_static/doctools.js?v=fd6eb6e6"></script>
6262
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
6363
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -72,7 +72,7 @@
7272
<link rel="prev" title="Changelog" href="changelog.html" />
7373
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7474
<meta name="docsearch:language" content="en"/>
75-
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260710" />
75+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7676
</head>
7777

7878

pr-12/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=8878045cc6db502f8baf" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
5858

59-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
59+
<script src="_static/documentation_options.js?v=7748d207"></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="prev" title="spatialdata-plot: rich static plotting from SpatialData objects" href="index.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+g076eeaca6.d20260710" />
73+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7474
</head>
7575

7676

pr-12/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=8878045cc6db502f8baf" />
4545
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
4646

47-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
47+
<script src="_static/documentation_options.js?v=7748d207"></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>
@@ -56,7 +56,7 @@
5656
<link rel="search" title="Search" href="search.html" />
5757
<meta name="viewport" content="width=device-width, initial-scale=1"/>
5858
<meta name="docsearch:language" content="en"/>
59-
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260710" />
59+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
6060
</head>
6161

6262

pr-12/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=8878045cc6db502f8baf" />
5757
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
5858

59-
<script src="_static/documentation_options.js?v=dbc0d07c"></script>
59+
<script src="_static/documentation_options.js?v=7748d207"></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>
@@ -69,7 +69,7 @@
6969
<link rel="next" title="Gallery" href="gallery.html" />
7070
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7171
<meta name="docsearch:language" content="en"/>
72-
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260710" />
72+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7373
</head>
7474

7575

pr-12/notebooks/examples/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=8878045cc6db502f8baf" />
5757
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
5858

59-
<script src="../../_static/documentation_options.js?v=dbc0d07c"></script>
59+
<script src="../../_static/documentation_options.js?v=7748d207"></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="prev" title="Scalebars in spatialdata-plot" href="../tutorials/scalebars.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+g076eeaca6.d20260710" />
73+
<meta name="docsearch:version" content="0.1.dev1+g076eeaca6.d20260712" />
7474
</head>
7575

7676

0 commit comments

Comments
 (0)