Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position stack+text geom #3416

Merged
merged 6 commits into from
Jul 17, 2019
Merged

Position stack+text geom #3416

merged 6 commits into from
Jul 17, 2019

Conversation

ikosmidis
Copy link
Contributor

closes #2709

@hadley hadley requested a review from thomasp85 July 8, 2019 12:27
@hadley hadley added the tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day label Jul 8, 2019
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR...it looks great! Could you add a test in tests/testthat/test-position-stack.R to make sure that this bug is fixed for all time? Something like this would work quite well:

test_that("position_stack() can stack when ymax is NA", {
  df <- data_frame(x = c(1, 1), y = c(1, 1))
  p <- ggplot(df, aes(x, y, ymax = NA_real_)) + geom_point(position = "stack")
  
  # expect something about layer_data(p)
})

@ikosmidis
Copy link
Contributor Author

Thank you for this PR...it looks great! Could you add a test in tests/testthat/test-position-stack.R to make sure that this bug is fixed for all time?

Thanks. I am afraid I am short of time here to write a proper test, but your proposal looks good; something like

expect_equal(layer_data(p)$y, c(1, 2))

should be sufficient. Feel free to add it directly once the pull request is approved.

@paleolimbot paleolimbot merged commit d1ecd03 into tidyverse:master Jul 17, 2019
@lock
Copy link

lock bot commented Jan 13, 2020

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using position_stack() with text geom in stat_summary()
3 participants