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

check on max bin count conditions for overflow = "compress" #207

Open
Tracked by #213
mjskay opened this issue Jan 12, 2024 · 1 comment
Open
Tracked by #213

check on max bin count conditions for overflow = "compress" #207

mjskay opened this issue Jan 12, 2024 · 1 comment

Comments

@mjskay
Copy link
Owner

mjskay commented Jan 12, 2024

in dot_heap and when overflow = "compress" --- pretty sure this check needs to be adjusted

@mjskay
Copy link
Owner Author

mjskay commented Jan 13, 2024

The problem is that the overflow = "compress" adjustment doesn't take into account the effective max bin count as calculated in dot_heap(). The right solution might be to optionally return the relevant info from find_dotplot_binwidth() so this check can be done.

An example showing the problem:

data.frame(x = dist_normal(0,1)) |> 
  ggplot(aes(xdist = x)) + 
  stat_dots(quantiles = 250, overflow = "compress", alpha = 0.5, binwidth = 0.5) + 
  geom_hline(yintercept = 0.9)

image

(alternative is to accept that overflow = "compress" is really only designed for when dots get very small, where it already works well).

@mjskay mjskay changed the title check on max bin count conditions for stackratio != 1 check on max bin count conditions for overflow = "compress" Jan 13, 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

No branches or pull requests

1 participant