Skip to content

Replace superseded coord_flip() with swapped aesthetics (#476)#477

Open
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
ishaan-arora-1:fix/replace-coord-flip-476
Open

Replace superseded coord_flip() with swapped aesthetics (#476)#477
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
ishaan-arora-1:fix/replace-coord-flip-476

Conversation

@ishaan-arora-1
Copy link
Contributor

Fixes #476.

coord_flip() is marked [Superseded] in ggplot2 — replaced with direct aesthetic swapping in ppc_error_scatter_avg() and the deprecated ppc_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

…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-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (05800bd) to head (8f679de).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Replace superseded coord_flip() with swapped aesthetics in ppc_error_scatter_avg

2 participants