Skip to content

Add plot titles showing BAM filename and fix boxplot layout#4

Merged
ewels merged 1 commit into
mainfrom
plot-titles
Feb 13, 2026
Merged

Add plot titles showing BAM filename and fix boxplot layout#4
ewels merged 1 commit into
mainfrom
plot-titles

Conversation

@ewels
Copy link
Copy Markdown
Member

@ewels ewels commented Feb 13, 2026

Summary

  • Add plot titles: Display the input BAM filename (without .bam suffix) as a bold title centered at the top of all three plot types (density scatter, boxplot, histogram)
  • Fix boxplot x-axis layout: Reduce excessive x_label_area_size from 150→70, eliminating the large gap between rotated tick labels and the x-axis description label

Details

Title implementation

  • Added title: &str parameter to all render functions and their public wrappers
  • Canvas is split vertically into a 35px title area + the plot area
  • Title is drawn in bold 18pt font, centered horizontally with 8px top margin
  • Canvas heights increased to accommodate: scatter/histogram 480→520, boxplot 480→560
  • bam_stem (already computed in main.rs) is passed through to all plot calls

Boxplot layout fix

  • x_label_area_size: 150→70 (was creating a huge gap between axis and label)
  • margin_bottom: 10→5

Verification

  • Tested with small benchmark (test.bam) and large benchmark (GM12878_REP1.markdup.sorted.bam)
  • All 24 unit tests + 8 integration tests pass
  • cargo fmt --check and cargo clippy -- -D warnings clean

- Add input filename (without .bam suffix) as a bold title at the top
  of all three plot types: density scatter, boxplot, and histogram
- Increase canvas heights to accommodate title area with proper margins
- Fix boxplot x-axis layout: reduce excessive x_label_area_size from
  150 to 70, eliminating the large gap between tick labels and axis label
@ewels ewels merged commit 8d55d1d into main Feb 13, 2026
4 checks passed
@ewels ewels deleted the plot-titles branch February 13, 2026 02:24
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.

1 participant