Replace superseded coord_flip() with swapped aesthetics (#476)#477
Open
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Open
Replace superseded coord_flip() with swapped aesthetics (#476)#477ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Conversation
…scatter_avg (stan-dev#476) coord_flip() is marked [Superseded] in ggplot2. Replaced with direct aesthetic swapping (aes(x = y_obs, y = value)) and corresponding label swaps in ppc_error_scatter_avg() and ppc_error_scatter_avg_vs_x().
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #477 +/- ##
==========================================
- Coverage 98.66% 98.66% -0.01%
==========================================
Files 35 35
Lines 5860 5857 -3
==========================================
- Hits 5782 5779 -3
Misses 78 78 ☔ View full report in Codecov by Sentry. 🚀 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.
Fixes #476.
coord_flip()is marked[Superseded]in ggplot2 — replaced with direct aesthetic swapping inppc_error_scatter_avg()and the deprecatedppc_error_scatter_avg_vs_x().Instead of building the plot with the axes one way and then flipping with
coord_flip(), the x and y aesthetics are now mapped directly to the intended axes. Visual output is identical (all vdiffr snapshots pass unchanged).https://ggplot2.tidyverse.org/reference/coord_flip.html