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

Factor out dynamic dotplot binning algorithm #77

Closed
3 tasks done
mjskay opened this issue Jun 14, 2021 · 1 comment
Closed
3 tasks done

Factor out dynamic dotplot binning algorithm #77

mjskay opened this issue Jun 14, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@mjskay
Copy link
Owner

mjskay commented Jun 14, 2021

Based on easystats/see#147 (comment)

While that function looks like a beast, it's really just three main steps: (1) determine bin size, (2) calculate data positions using that bin size, (3) create the grobs. Most likely I will end up with a function for (1) and a function for (2); (3) is pretty straightforward on its own. Hopefully you will then be able to use those two functions to make a custom grob easily.

Plan is something like:

  • make a find_dotplot_binwidth() function that figures out the binwidth
    • [ ] (possibly) make the above more generic (i.e. not make assumptions about graphics environment) and have a convenience function like find_dotplot_grob_binwidth() that calls down to the above while figuring out x/y ratios and whatnot from the {grid} environment (on the assumption it is called inside a grob)
  • make a bin_dots() function that does the actual binning given a binwidth
  • add examples to docs
@mjskay
Copy link
Owner Author

mjskay commented Jun 18, 2021

Reopening this since I forgot to add examples

@mjskay mjskay reopened this Jun 18, 2021
@mjskay mjskay added this to the Next release milestone Jun 18, 2021
@mjskay mjskay added the documentation Improvements or additions to documentation label Jun 18, 2021
@mjskay mjskay closed this as completed in de20d5c Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant