Skip to content

Fix anno_barplot number placement with explicit ylim and reverse axes#1261

Open
foertsch wants to merge 2 commits into
jokergoo:masterfrom
foertsch:fix-anno-barplot-number-spacing
Open

Fix anno_barplot number placement with explicit ylim and reverse axes#1261
foertsch wants to merge 2 commits into
jokergoo:masterfrom
foertsch:fix-anno-barplot-number-spacing

Conversation

@foertsch

Copy link
Copy Markdown

Reviewer note: I kept this as two separate commits on purpose so each fix can be reviewed or cherry-picked independently.

  • 2bc989e is the narrower #1248 fix for explicit ylim
  • f74fdda is the reverse-axis follow-up for #1247

If you'd prefer, I can also split these into two separate PRs, but I kept them together since they touch the same anno_barplot() code path and share related regression coverage.

Summary

  • Respect explicit ylim when add_numbers = TRUE
  • Fix reverse barplot number spacing/placement
  • Add focused regression tests for both cases

Commit breakdown

  1. 2bc989e Respect explicit ylim in anno_barplot with add_numbers

  2. f74fdda Fix reverse anno_barplot number spacing and labels

Tests

Added:

  • tests/testthat/testthat-AnnotationFunction-barplot-explicit-ylim.R
  • tests/testthat/testthat-AnnotationFunction-barplot-reverse.R

Verified locally with:

testthat::test_file("tests/testthat/testthat-AnnotationFunction-barplot-explicit-ylim.R")
testthat::test_file("tests/testthat/testthat-AnnotationFunction-barplot-reverse.R")
testthat::test_dir("tests/testthat", filter = "AnnotationFunction-barplot|UpSet")

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.

Barplot options add_numbers messes with ylim Incorrect numbers on reverse barplots

1 participant