You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brings feature parity with stat_count by adding `after_stat(bin_prop)`
functionality to stat_bin. The bin_prop variable shows the proportion
of each group within each bin, enabling proportion-based visualizations
for binned continuous data.
Key features:
- bin_prop = count_in_group / total_count_in_bin
- Works with multiple groups and respects weights
- Backwards compatible (bin_prop = 1 for single groups)
- Properly handles empty bins
Usage:
ggplot(data, aes(x = continuous_var, y = after_stat(bin_prop), fill = group)) +
stat_bin(geom = "col", position = "dodge")
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments