You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Prose pass on the scalebar tutorial markdown cells.
- Regenerate the gallery thumbnail from the notebook's final plot: no
title/axes, landscape ~1.11 ratio to match the sibling cards.
- CONTRIBUTING: reference assets by the submodule-mount paths (absolute
/notebooks/... for index.md cards, relative ../ from notebook cells).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: tutorials/scalebars.ipynb
+33-9Lines changed: 33 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@
83
83
"source": [
84
84
"## 1. The one required piece: `scalebar_dx`\n",
85
85
"\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`."
87
87
]
88
88
},
89
89
{
@@ -139,7 +139,7 @@
139
139
"source": [
140
140
"## 2. Units and auto-scaling\n",
141
141
"\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 automatically — a bar spanning thousands of µm is relabelled in mm. Here the same image at a coarse 50 µm/pixel crosses that threshold:"
143
143
]
144
144
},
145
145
{
@@ -181,7 +181,7 @@
181
181
"source": [
182
182
"## 3. Placement and appearance with `scalebar_params`\n",
183
183
"\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",
185
185
"\n",
186
186
"- `location` — which corner (`\"lower right\"`, `\"upper left\"`, …).\n",
187
187
"- `color` — bar and text colour (use white on dark images).\n",
0 commit comments