Use geom_step() as default in ppc_ecdf_overlay() and deprecate discrete argument#533
Merged
jgabry merged 7 commits intostan-dev:masterfrom Apr 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates ECDF overlay plots to always render as step functions (consistent with the ECDF definition) and deprecates the discrete argument across related PPC/PPD helpers.
Changes:
- Hard-code
geom = "step"inppc_ecdf_overlay(),ppc_ecdf_overlay_grouped(), andppd_ecdf_overlay(). - Deprecate the
discreteargument usinglifecycle::deprecate_warn(). - Update tests and vdiffr snapshots to reflect the new default rendering and to assert deprecation behavior.
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| R/ppc-distributions.R | Switch ECDF overlays to step geom unconditionally; add deprecation warning and doc updates. |
| R/ppd-distributions.R | Switch PPD ECDF overlay to step geom unconditionally; add deprecation warning. |
| tests/testthat/test-ppc-distributions.R | Update vdiffr labels and add tests for deprecation + no-warning behavior when discrete isn’t supplied. |
| tests/testthat/_snaps/ppc-distributions/ppc-ecdf-overlay-default.svg | Regenerate snapshot for step-function ECDF rendering. |
| tests/testthat/_snaps/ppc-distributions/ppc-ecdf-overlay-size-alpha.svg | Regenerate snapshot and update title text. |
| tests/testthat/_snaps/ppc-distributions/ppc-ecdf-overlay-grouped-default.svg | Regenerate snapshot for grouped step-function ECDF rendering. |
| tests/testthat/_snaps/ppc-distributions/ppc-ecdf-overlay-grouped-size-alpha.svg | Regenerate snapshot and update title text. |
| NEWS.md | Document the behavior change and discrete deprecation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #533 +/- ##
==========================================
- Coverage 99.18% 99.15% -0.04%
==========================================
Files 35 35
Lines 5903 5920 +17
==========================================
+ Hits 5855 5870 +15
- Misses 48 50 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jgabry
approved these changes
Apr 8, 2026
Member
jgabry
left a comment
There was a problem hiding this comment.
Thanks, I agree it makes sense to just always use geom_step
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #259
The ECDF is a step function by definition, regardless of whether the data is continuous or discrete.
ppc_km_overlay()already hard-codesgeom_step()for the same reason. This PR makesppc_ecdf_overlay()consistent.Changes
ppc_ecdf_overlay(),ppc_ecdf_overlay_grouped(), andppd_ecdf_overlay()now always usegeom = "step"instat_ecdf()discreteargument is deprecated vialifecycle::deprecate_warn()