ggdist 3.2.1
New features and enhancements:
- Support for non-numeric distributions in
stat_slabinterval()and
stat_dotsinterval(), includingdist_categorical(),dist_bernoulli(),
and the upcomingposterior::rvar_factor()type. (#108) - Various improvements to dotplot layout in
geom_dotsinterval():- new
layout = "hex"allows a hexagonal circle-packing style layout (#161). - new mechanism for smoothing dotplots using the
smoothparameter, including
smooth = "bounded"/smooth = "unbounded"(for "density dotplots") and
smooth = "discrete"/smooth = "bar"(for improved layout of large-n
discrete distributions). (#161) - a better bin/dot-nudging algorithm using constrained optimization (#163)
- new
overlaps = "keep"option disables bin/dot nudging in"bin","hex",
and"weave"layouts. This meanslayout = "weave"withoverlaps = "keep"
will yield exact dot positions. (#161) - The
"weave"layout now works properly withside = "both" - fixed binning artifacts when there is high density on the edges, particularly
right edges (#144) - use a max
binwidthof 1 for discrete distributions (#159) - new
overflow = "compress"allows layouts to be compressed to fit into the
geom bounds if a user-specifiedbinwidthwould otherwise cause the dots
to exceed the geom bounds. (#162)
- new
- Two new shortcut geoms for
geom_dotsinterval():geom_swarm()andgeom_weave().
Both can be used to quickly create "beeswarm"-like plots. - A new "mirrored" scale for the
sideaesthetic,scale_side_mirrored(), makes it
easier to create mirrored slabs and dotplots. (#142) - Custom density estimators can now be used with
stat_slabinterval()via the
densityargument, including a new bounded density estimator (density_bounded()).
(#113) - Following the split between
sizeandlinewidthaesthetics in ggplot2 3.4,
the following aesthetics have been updated (#138):interval_sizeis nowlinewidthslab_sizeis nowslab_linewidth- in
geom_slab(),geom_dots(), andgeom_lineribbon(),sizeis nowlinewidth
- A new experimental mini domain-specific language for probability expressions
in ggdiststats: thePr_()andp_()functions can be used to generate
after_stat()expressions in terms of ggdist computed variables; e.g.
aes(thickness = !!Pr_(X <= x))maps the CDF of the distribution onto the
thicknessaesthetic;aes(thickness = !!p_(x))maps the PDF onto the
thicknessaesthetic. (#160) - Several function families in ggdist now use "currying" (automatic partial
function application). These function families partially apply themselves until all
non-optional arguments have been supplied:point_interval(),smooth_...,
anddensity_.... Seehelp("automatic-partial-functions"). - Performance improvements for
point_interval()on grouped data frames. (#154)
Documentation:
- Uses of
stat()have been replaced withafter_stat()to be consistent with
the deprecation ofstat()in ggplot2 3.4.