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

Weighted densities support #90

Merged
merged 7 commits into from
Feb 7, 2024
Merged

Conversation

joranE
Copy link
Contributor

@joranE joranE commented Feb 6, 2024

This is an attempt to resurrect PR59 from @mkoohafkan.

I tried to address the notes on the original PR, narrowing the focus to just adding the weight aesthetic and adding two tests, one for the unweighted density case and one for the weighted case.

gg_no_wts <- layer_data(ggplot(df, aes(x = x, y = 0)) + stat_density_ridges())
d_no_wts <- stats::density(df$x)

expect_equal(gg_no_wts$density,d_no_wts$y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please always put a space after a comma (there are a few more cases like that in the following lines).

@clauswilke
Copy link
Collaborator

This generally looks good to me. Could you also make an entry in NEWS.md? See ggridges version 0.5.5 for examples by external contributors.

@joranE
Copy link
Contributor Author

joranE commented Feb 6, 2024

Thanks for the quick turnaround! Let me know if there's anything else I need to clean up!

@clauswilke clauswilke merged commit a8a9982 into wilkelab:master Feb 7, 2024
5 checks passed
@clauswilke
Copy link
Collaborator

Thanks for your contribution! I just recently made a release, so not sure how quickly this will percolate to CRAN. But at least it's in the github version now.

This was referenced Feb 7, 2024
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.

2 participants