Releases: flrd/ggpointless
Release list
ggpointless 0.3.0
New features
-
New
geom_unit_bar(),geom_unit_col(), andgeom_unit_histogram()
draw isotype / pictogram bar charts, where each bar is a stack of discrete
unit cells (one cell = one observation by default).geom_unit_bar()counts
observations likegeom_bar();geom_unit_col()uses pre-computedylike
geom_col();geom_unit_histogram()bins a continuous variable like
geom_histogram(). Fractionalyvalues produce a partial cell at the
outer edge. All three work withcoord_equal(),coord_polar(),
coord_radial(),coord_flip(), and faceting. #15 -
New
label_cells(cell_size)helper pairs withcell_sizeto relabel
the value axis in cell counts instead of raw units: pass it to
scale_y_continuous(labels = ...)so a tick aty = 200displays as2
whencell_size = 100. -
New
geom_gridline()draws (panel)grid lines as a layer on top of other
geoms. Reads positions directly from the trained scales (no manual breaks
needed), inherits line styling from
theme(panel.grid.major.*)/panel.grid.minor.*for any property not
explicitly overridden, and supportscoord_polar()/coord_radial(). Use
grids = "x" / "y" / c("x", "y")to pick axes;minor = TRUEto draw
minor lines too. To remove the underlying theme grid, compose
with+ theme(panel.grid = element_blank()). #12 -
New
geom_path_fade(),geom_line_fade(), andgeom_step_fade()draw
paths, lines, and step functions with a linear alpha gradient along their
length, so one or both ends fade to transparent. Thefade_directionargument
controls which end(s) fade ("end","start", orc("start", "end"));
alpha_fade_tosets the target alpha. -
New
geom_segment_fade()draws individual line segments like
geom_segment()but fades each segment along its own direction — the
gradient follows the segment from(x, y)to(xend, yend), so it works at
any angle. Accepts the samefade_directionandalpha_fade_toarguments as
geom_path_fade(). #11 -
New
geom_curve_fade()draws Bézier curves likegeom_curve()but with
an alpha gradient along the curve direction. The fade follows from start to
end point, so curves fade at any angle. Uses the samefade_directionand
alpha_fade_toarguments asgeom_segment_fade(), with Porter-Duff
compositing for smooth gradients. Falls back to semi-transparent curves on
unsupported devices. #11 -
New
geom_abline_fade(),geom_hline_fade(), andgeom_vline_fade()
draw reference lines (diagonal, horizontal, vertical) with an alpha gradient
along the line direction. They mirror theggplot2annotation pattern: pass
slope/intercept,yintercept, orxinterceptdirectly for constant
lines, or supplydataandmappingfor facet-varying lines. Under
non-linear coordinate systems (coord_polar(),coord_radial()) the fade
follows the curve that the coord transform produces —geom_hline_fade()
fades around a circle,geom_vline_fade()fades along a ray, and
geom_abline_fade()fades along the resulting arc. -
New
geom_rect_fade()draws arbitrary rectangles with a
linear alpha gradient that fades one edge to transparent. Thefade_direction
argument controls the gradient direction:"vertical"(default) fades from
opaque at the top to transparent at the bottom;"horizontal"fades from
opaque at the left to transparent at the right. Supports aradiusargument
for rounded corners too. #13 -
New
geom_col_fade(),geom_bar_fade(), andgeom_histogram_fade()
draw bar charts with a vertical alpha gradient that fades from opaque at
the peak to transparent at the baseline. Additionally these geoms support a
radiusto draw bar charts with rounded corners
The rendering tier is chosen at draw time: gradient fill on capable devices, flat
semi-transparent fill onpdf()/postscript(). #14 -
New
geom_freqpoly_fade()draws a filled frequency polygon — the area under
thegeom_freqpoly()line — with the same fading gradient as
geom_area_fade(). Paired withstat_bin(), so all binning parameters
(bins,binwidth,center,boundary, …) are forwarded. -
New
geom_density_fade()draws a kernel density estimate with a fading
gradient, usinggeom_area_fade()paired withstat_density(). Accepts all
smoothing parameters (bw,adjust,kernel,bounds, …). -
New
geom_ridgeline_fade(),geom_ridgeline_density_fade(),
geom_ridgeline_histogram_fade(), andgeom_ridgeline_freqpoly_fade()draw
ridgeline plots — overlapping ridge shapes at different vertical offsets — with
a vertical alpha gradient that fades from opaque at each ridge's peak to
transparent at the baseline. Thealpha_scopeargument controls how alpha is
scaled across ridges.geom_ridgeline_fade()takes explicit(x, y, height);
the three other forms computeheightfrom a stat (smooth density, stepped
histogram, polyline frequency polygon) so users only supply(x, y). All four
handle negative heights (dips below the baseline) with a bidirectional gradient.
Thescaleargument defaults toNULL, which auto-scales the layer so
the tallest ridge overlaps its neighbour by ~50% (the canonical "mountain
range" ridgeline look). The auto-resolved value is reported via a
cli::cli_inform()so you have a starting point if you want to override. #19 -
New
PositionRidgeline(callable viaposition = "ridgeline") is the
position adjustment that converts a(y, height)mapping into the
ribbon-style(ymin, ymax)formGeomRibbonexpects, so each ridge sits
on its own y-baseline. Used as the default position by
geom_ridgeline_fade(), but also composes with vanilla
[ggplot2::geom_ribbon()] for users who want the layout without the fade.
Breaking changes
-
geom_point_glow(glow_size = X)now interpretsXat face value in
ggplot2size units, matching thesizeaesthetic of
[ggplot2::geom_point()]. PreviouslyXwas wrongfully multiplied by 3
before rendering, so existing user-supplied values render roughly
three times smaller than in 0.2.0. The default (glow_size = NA) is
unchanged and still renders at nine times the point'ssize. -
Removed
geom_lexis(point_size = ...), deprecated since 0.1.0 in favour
ofsize. Code still passingpoint_sizewill now error with
unused argument; rename the argument tosize.
Bug fixes and improvements
-
stat_chaikin()no longer renders nothing without a message when the
smoothed data has missing values in different rows of(x, y)than in a
numeric extra aesthetic (e.g.aes(fill = z)wherezhas its own NAs).
Previously each numeric column was de-NA'd independently, the resulting
per-column outputs had different lengths, the assignment errored, and
ggplot2's stat machinery silently swallowed the error — leaving an empty
layer. The stat now pre-filters complete cases across all numeric columns
once and warns about dropped rows in the standardggplot2way (suppress
viana.rm = TRUE). #18 -
stat_fourier()/stat_catenary()/stat_arch()no longer crash
ggplot2's limit expansion when paired withcoord_transform(y = "log10")
(and other restricted-domain transforms such as"log","sqrt").
The stats now drop those rows with a single helpful warning that points users
atscale_y_log10(), which transforms before the stat runs and avoids the
issue entirely. -
stat_pointless()/geom_pointless(): when a single observation matches
multiplelocationcriteria — e.g. the last point is also the maximum —
after_stat(location)now carries a composite label (e.g."last, maximum")
instead of silently dropping the secondary labels. Previously only the first
matching label in iteration order was kept. Row order still follows the order
given inlocation(canonical"first","last","minimum","maximum"
for"all"). -
geom_area_fade(): now renders alpha gradient when+ coord_flip()is
applied. Previously the geom did not render any fill without a message or
warning shown to users. #17 -
geom_area_fade(): on devices without gradient support (basepdf(),
postscript()) the informational message now fires for solid-fill plots too
— users were previously silent about the lost vertical fade unlessfill
was mapped to a variable. Wording is tailored to what was actually lost
(colour gradient vs. vertical fade). Devices that support gradients but not
compositing still stay silent for solid-fill plots (tier 2 renders the
vertical fade faithfully). -
geom_area_fade(): theglobal_max_absscan that drivesalpha_scope = "global"now handlesDateandPOSIXctvalue axes. Previously both
failedis.numeric()and silently fell back toglobal_max = 1; plots
built through the normal scale pipeline were unaffected (values are
already numeric by draw time), but directdraw_panel()calls with raw
Date / POSIXct ymax are now robust. -
geom_area_fade(): the legend key (.draw_key_area_fade()) now validates
alpha_fade_tovia the shared.check_alpha_fade_to()helper, matching
the validation used bysetup_params(). A guide that constructs a key
outside the normal setup pipeline now aborts on out-of-range values
instead of silently producing an invalid gradient. -
geom_area_fade(): fixed alpha overflow for stacked areas with
alpha_scope = "global"(the default). The reference max was computed
from the pre-stackingyvalues, so the top ribbon's alpha exceeded 1
and was silently clamped to fully opaque, defeating the fade. The
reference is now taken from post-position-adjustment data, so equal
rendered|y|maps to equal opacity as documented. No effect on
position = "identity"oralpha_scope = "group". -
geom_area_fade(): now accepts both integer and floating...
ggpointless 0.2.0
New features
-
New
geom_fourier()andstat_fourier()fit a truncated Fourier series
(viastats::fft()) tox/ydata and render the reconstructed curve.
Supports optional detrending ("lm"or"loess") and harmonic selection
vian_harmonics(#7). -
New
geom_arch()andstat_arch()draw inverted catenary curves (arches)
between successive points, complementing the existinggeom_catenary()(#4). -
New
geom_area_fade()draws area charts where the fill colour fades from
opaque to transparent usinggrid::linearGradient(). The fade target alpha
is controlled viaalpha_fade_to(#3). -
New
geom_point_glow()draws points with a radial gradient glow behind
each point usinggrid::radialGradient(). The glow alpha, colour, and size
can be customised viaglow_alpha,glow_colour, andglow_size(#6).
Breaking changes
- The bundled (but outdated) datasets
co2_ml,covid_vac, andfemale_leadershave been
removed from the package. These datasets can be obtained from their
original sources: Mauna Loa CO2,
CDC vaccination data,
and Wikipedia female leaders,
respectively. Thevignette("examples")that showcased these datasets has
been removed alongside them.
Improvements
-
The package now requires R >= 4.2.0 and ggplot2 >= 4.0.0. Several geoms
take (mostly internal) advantage of new ggplot2 features such as
make_constructor(), andgg_par(). -
Messages and errors across the package have been migrated to the
cliand
rlangpackages, giving consistent, hyperlink-aware output. -
geom_catenary()gained a vectorizedchain_lengthargument and
deprecatedchainLengthinstead (#4). -
stat_catenary()no longer wrongfully removes data points when the upper
limit inylim()is set to the maximum y-value of the dataset (#1).
ggpointless 0.1.0
- New
geom_catenary()andstat_catenary()let you draw a hanging chain. geom_lexis()supportslinewidthargument now, which was released in
ggplot2v3.4.0.geom_lexis()deprecatespoint_sizeargument in favour ofsize.
ggpointless v0.0.3
ggpointless 0.0.2
geoms/stats
geom_lexis()
stat_lexis()
datasets
female_leaders