Skip to content

docs(plotting): add inline plot example for highest_expr_genes#4025

Merged
flying-sheep merged 3 commits intoscverse:mainfrom
haoyu-haoyu:docs/inline-plot-examples
Apr 7, 2026
Merged

docs(plotting): add inline plot example for highest_expr_genes#4025
flying-sheep merged 3 commits intoscverse:mainfrom
haoyu-haoyu:docs/inline-plot-examples

Conversation

@haoyu-haoyu
Copy link
Copy Markdown
Contributor

Summary

Add .. plot:: directive examples to the docstrings of two plotting functions that were missing inline examples:

  • sc.pl.highest_expr_genes: default usage and n_top=10 variant
  • sc.pl.highly_variable_genes: default usage and log=True variant

These are two of the remaining unchecked items from #1664.

Pattern

Follows the established pattern from existing inline examples (e.g., pca_loadings, rank_genes_groups_heatmap):

  • First block loads data with sc.datasets.pbmc3k_processed()
  • Subsequent blocks demonstrate parameter variations
  • Uses :context: close-figs directive option

Ref #1664

…ghly_variable_genes

Add ``.. plot::`` directive examples to the docstrings of:
- ``sc.pl.highest_expr_genes``: default usage and n_top=10
- ``sc.pl.highly_variable_genes``: default usage and log=True

These are two of the remaining unchecked items from scverse#1664.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.06%. Comparing base (c7c1f4e) to head (4e8211f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4025      +/-   ##
==========================================
- Coverage   78.51%   78.06%   -0.46%     
==========================================
  Files         117      117              
  Lines       12753    12753              
==========================================
- Hits        10013     9955      -58     
- Misses       2740     2798      +58     
Flag Coverage Δ
hatch-test.low-vers 77.80% <ø> (ø)
hatch-test.pre 68.72% <ø> (-8.75%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/plotting/_qc.py 86.11% <ø> (ø)

... and 2 files with indirect coverage changes

@flying-sheep
Copy link
Copy Markdown
Member

hi, thank you for your contribution! @Ekin-Kahraman had the same idea for hvg, but uses the usual preprocessing, so I’ll merge both PRs.

@flying-sheep flying-sheep changed the title docs(plotting): add inline plot examples to highest_expr_genes and highly_variable_genes docs(plotting): add inline plot example for highest_expr_genes Apr 7, 2026
@flying-sheep flying-sheep merged commit 9bc2c1e into scverse:main Apr 7, 2026
11 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/scanpy that referenced this pull request Apr 7, 2026
flying-sheep pushed a commit that referenced this pull request Apr 7, 2026
…xample for `highest_expr_genes`) (#4035)

Co-authored-by: haoyu-haoyu <85037553+haoyu-haoyu@users.noreply.github.com>
@flying-sheep flying-sheep mentioned this pull request Apr 7, 2026
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants