Skip to content

Commit fcef10c

Browse files
committed
Preview for PR #12 4fb80b4
1 parent 34318cd commit fcef10c

5 files changed

Lines changed: 58 additions & 47 deletions

File tree

181 KB
Loading
182 KB
Loading

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

Lines changed: 50 additions & 44 deletions
Large diffs are not rendered by default.

pr-12/notebooks/tutorials/scalebars.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ <h2>3. Placement and appearance with <code class="docutils literal notranslate">
464464
<li><p><code class="docutils literal notranslate"><span class="pre">length_fraction</span></code> — target bar length as a fraction of the axes width.</p></li>
465465
<li><p><code class="docutils literal notranslate"><span class="pre">scale_loc</span></code> / <code class="docutils literal notranslate"><span class="pre">label_loc</span></code> — where the number and unit sit relative to the bar.</p></li>
466466
</ul>
467+
<p>The default box is <strong>white</strong>, so on a dark image like <code class="docutils literal notranslate"><span class="pre">blobs</span></code> you either keep the default (dark bar on a white box) or, if you switch to <code class="docutils literal notranslate"><span class="pre">color=&quot;white&quot;</span></code>, pair it with a dark box (<code class="docutils literal notranslate"><span class="pre">box_color</span></code>/<code class="docutils literal notranslate"><span class="pre">box_alpha</span></code>) or <code class="docutils literal notranslate"><span class="pre">frameon=False</span></code> — otherwise the white bar lands on the white box and disappears.</p>
467468
<div class="cell docutils container">
468469
<div class="cell_input docutils container">
469470
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">sdata</span><span class="o">.</span><span class="n">pl</span><span class="o">.</span><span class="n">render_images</span><span class="p">(</span><span class="s2">&quot;blobs_image&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">pl</span><span class="o">.</span><span class="n">show</span><span class="p">(</span>
@@ -494,14 +495,16 @@ <h2>3. Placement and appearance with <code class="docutils literal notranslate">
494495
<span class="n">scalebar_params</span><span class="o">=</span><span class="p">{</span>
495496
<span class="s2">&quot;location&quot;</span><span class="p">:</span> <span class="s2">&quot;lower right&quot;</span><span class="p">,</span>
496497
<span class="s2">&quot;color&quot;</span><span class="p">:</span> <span class="s2">&quot;white&quot;</span><span class="p">,</span>
498+
<span class="s2">&quot;box_color&quot;</span><span class="p">:</span> <span class="s2">&quot;black&quot;</span><span class="p">,</span>
499+
<span class="s2">&quot;box_alpha&quot;</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">,</span>
497500
<span class="s2">&quot;font_properties&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;size&quot;</span><span class="p">:</span> <span class="mi">14</span><span class="p">,</span> <span class="s2">&quot;weight&quot;</span><span class="p">:</span> <span class="s2">&quot;bold&quot;</span><span class="p">},</span>
498501
<span class="p">},</span>
499502
<span class="p">)</span>
500503
</pre></div>
501504
</div>
502505
</div>
503506
<div class="cell_output docutils container">
504-
<img alt="../../_images/35832cd7c4ea8a3a08a598e8aa42541626218b85e13105426d2280fafa622ed9.png" src="../../_images/35832cd7c4ea8a3a08a598e8aa42541626218b85e13105426d2280fafa622ed9.png" />
507+
<img alt="../../_images/ca7131b57c2ea1e2e9cae23d333f5b079f5094c4cd42fac6c19b8463cc5e5c75.png" src="../../_images/ca7131b57c2ea1e2e9cae23d333f5b079f5094c4cd42fac6c19b8463cc5e5c75.png" />
505508
</div>
506509
</div>
507510
</section>
@@ -516,6 +519,8 @@ <h2>4. Pinning an exact bar length<a class="headerlink" href="#pinning-an-exact-
516519
<span class="n">scalebar_params</span><span class="o">=</span><span class="p">{</span>
517520
<span class="s2">&quot;location&quot;</span><span class="p">:</span> <span class="s2">&quot;lower right&quot;</span><span class="p">,</span>
518521
<span class="s2">&quot;color&quot;</span><span class="p">:</span> <span class="s2">&quot;white&quot;</span><span class="p">,</span>
522+
<span class="s2">&quot;box_color&quot;</span><span class="p">:</span> <span class="s2">&quot;black&quot;</span><span class="p">,</span>
523+
<span class="s2">&quot;box_alpha&quot;</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">,</span>
519524
<span class="s2">&quot;fixed_value&quot;</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span>
520525
<span class="s2">&quot;fixed_units&quot;</span><span class="p">:</span> <span class="s2">&quot;um&quot;</span><span class="p">,</span>
521526
<span class="p">},</span>
@@ -524,7 +529,7 @@ <h2>4. Pinning an exact bar length<a class="headerlink" href="#pinning-an-exact-
524529
</div>
525530
</div>
526531
<div class="cell_output docutils container">
527-
<img alt="../../_images/78bb6c5caa248ca7cd1404b0982b27bd60a1cac45faeb67d471398e4ff861a68.png" src="../../_images/78bb6c5caa248ca7cd1404b0982b27bd60a1cac45faeb67d471398e4ff861a68.png" />
532+
<img alt="../../_images/92fec706a22c7aca3d3908c49bdd801580bdf8d1475d38fcd7078082037b2def.png" src="../../_images/92fec706a22c7aca3d3908c49bdd801580bdf8d1475d38fcd7078082037b2def.png" />
528533
</div>
529534
</div>
530535
</section>

pr-12/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)