Repository navigation
plot.psa(center = FALSE): no fill-scale warning - #247
Merged
Merged
Conversation
Without center points the plot has no fill aesthetic, so the manual fill scale from add_common_aes() made ggplot2 warn when the plot was drawn. Applies to both the cost-effectiveness plane and the incremental plane (ref_str).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #247 +/- ##
=======================================
Coverage 93.08% 93.09%
=======================================
Files 18 18
Lines 1822 1824 +2
=======================================
+ Hits 1696 1698 +2
Misses 126 126
🚀 New features to boost your workflow:
|
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.
What
plot(psa, center = FALSE)warned when the plot was drawn:Only the center points use the
fillaesthetic, butplot.psa()always askedadd_common_aes()for a fill scale. Without center points the scale had nothing to match. This affected both the cost-effectiveness plane and the incremental plane (ref_str). The default plot (center = TRUE) was never affected.Change
Both branches of
plot.psa()now passcol_aes = c("color", "fill")only whencenter = TRUE, and"color"otherwise.Tests
New test in
test_plot_options.R:ggplot_build()raises no warning withcenter = FALSE, ellipse = FALSE, on both planes and for everycoloption. With center points, the plot still has both color and fill scales. The test fails 6 times without the fix.Verification
devtools::test(): 345 passed, 0 failed. The remaining 3 warnings are mgcv's "k has been set to its minimum" intest_metamod.R, unrelated.lintr::lint_package(): 0 lints.main.R CMD check --as-cran: only the development-version NOTE.Found while fixing CI on #227. It is independent of #227 and can merge in either order.