Published February 13, 2022
| Version v3.1.0
Software
Open
ggdist: Visualizations of distributions and uncertainty
Description
New features and enhancements:
- The
stat_sample_...andstat_dist_...families of stats have been merged (#83).- All
stat_dist_...stats are deprecated in favor of theirstat_...counterparts, which now understand thedist,args, andarg1...arg9aesthetics. xdistandydistcan now be used in place of thedistaesthetic to specify the axis one is mapping a distribution onto (distmay be deprecated in the future).- Passing dist-like objects to the
xoryaesthetics now raise a helpful error message suggesting you probably want to usexdistorydist. - Restructured internals for stats and geoms makes it much easier to maintain shortcut geoms and stats, eliminating a large amount of code duplication (#106).
- New
expandparameter tostat_slabinterval()allows explicitly setting whether or not the slab is expanded to the limits of the scale (rather than implicitly setting this based onslab_type).
- All
- The
point_interval()family of functions can now be passeddistributionalandposterior::rvar()objects, meaning that means and modes (in addition to medians) and highest-density intervals (in addition to quantile intervals) can now be visualized for analytical distributions.- As part of this, multivariate distribution objects and
rvars will generate a.indexcolumn when passed topoint_interval()functions (#111). Based on a suggestion from @mitchelloharawild.
- As part of this, multivariate distribution objects and
- New
stat_ribbon()provided as a shortcut stat forstat_lineribbon()with no line (#48). Also, if you supply only anxoryaesthetic togeom_lineribbon(), you will get ribbons without a line (#127). - One-sided intervals (i.e. quantiles) can now be calculated using
ul()(upper limit) orll()(lower limit), e.g. withpoint_interval()explicitly or viamean_ll(),median_ll(),mode_ll(),mean_ul(),median_ul(), ormode_ul()(#49). - Constant distributions are now reliably detected in a variety of situations and rendered as point masses in both density plots and histograms (#103, #32).
- Minor improvements and changes to dotplot layouts that may result in minor changes to the appearance of existing dotplots:
- Minor improvements to automatic bin width selection; the maximum dot stack height should be closer to or equal to
scalemore often. - A formerly-internal fudge factor of
1.07for dot sizes is now exposed as the default value of thedotsizeparameter instead of being applied internally. This fudge factor tends (in my opinion) to make dotplots look a bit better due to the visual distance between circles, but is (I think) better used as an explicit value than an implicit one, hence the change. This may create subtle changes to plots that use thedotsizeorstackratioparameters, but allows those parameters to have a more precise geometric interpretation.
- Minor improvements to automatic bin width selection; the maximum dot stack height should be closer to or equal to
Documentation:
- New vignette for the
stat_dotsinterval()sub-family:vignette("dotsinterval")(#120). - Vastly improved and expanded documentation for the
stat_slabinterval()andgeom_slabinterval()family: each shortcut stat/geom now has its own documentation page that comprehensively lists all parameters, aesthetics, and computed variables, including those pulled in via...from typically-paired geoms. These docs are auto-generated and should be easy to maintain going forward. (#36) - The
stat_lineribbon()andgeom_lineribbon()family now also has separate documentation pages with a comprehensive listing of aesthetics and parameters (#107). - Ridge plot-like example in
vignette("slabinterval")using the newexpandparameter (#115).
Deprecations and removals:
- The
.probargument, a long-deprecated alias for.width, was removed. - The
limits_function,limits_args,slab_function,slab_args,interval_function, andinterval_argsarguments tostat_slabinterval()were removed: these were largely internal-use parameters only needed by subclasses of the base class for creating shortcut stats, yet added a lot of noise to the documentation, so these were replaced with the$compute_limits(),$compute_slabs(), and$compute_intervals()methods on the newAbstractStatSlabintervalinternal base class.
Bug fixes:
- Improved handling of
NAs for analytical distributions. - Fixed bug where within-bin order of dots in dotplots for
"bin"and"weave"layouts could be incorrect with aesthetics mapped at a sub-bin level. stackratios that are not equal to1are now accounted for infind_dotplot_binwidth()(i.e. automatic dotplot bin width selection).- Ensure distinct fill colors in lineribbons are still treated as distinct for grouping even if the
fill_rampaesthetic ramps them to the same color.
Files
mjskay/ggdist-v3.1.0.zip
Files
(23.4 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:71fe4765fdc7144ed3725b8d2ceab411
|
23.4 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/mjskay/ggdist/tree/v3.1.0 (URL)