Miscellaneous Extensions to 'ggplot2'
Overview
Extensions to 'ggplot2' respecting the grammar of graphics paradigm. Statistics to locate and tag peaks and valleys and to label plots with the equation of a fitted polynomial model by ordinary least squares, major axis, quantile and robust and resistant regression approaches. Line and model equation for Normal mixture models. Labels for P-value, R^2 or adjusted R^2 or information criteria for fitted models; parametric and non-parametric correlation; ANOVA table or summary table for fitted models as plot insets; annotations for multiple pairwise comparisons with adjusted P-values. Model fit classes for which suitable methods are provided by package 'broom' and 'broom.mixed' are supported as well as user-defined wrappers on model fit functions, allowing model selection and conditional labelling. Scales and stats to build volcano and quadrant plots based on outcomes, fold changes, p-values and false discovery rates.
The main changes in this version are support for orientation = "y" in all
statistics, improved support for non-linear models, using ordinary or orthogonal
least squares, the computation of the position of tail quantiles in fitted
mixture of Normals models, and a major update of the documentation and website.
- Add function
f_use_label()similar touse_label()but relying on a
format to build the combined character string mapped to the label aesthetic.
- Update all statistics so that they issue a message in _interactive R sessions_
listing short names of formatted labels or full names of variables available
for mapping to aesthetics.
- Update
check_poly_formula()to issue warnings when the model formula
includes on-the-fly transformations in the rhs or lhs, indicating the need to
pass a matching argument to eq.x.rhs or eq.lhs. Fix parsing failures leading
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
to wrong test outcomes in some edge cases. Detect formulas containing spline
base functions bs, ns or lspline as not being regular polynomials.
- Add
stat_spikes()with similar functionality asstat_peaks()and
stat_valleys() but targeting very narrow peaks and valleys with unusually
abrupt transitions from the baseline.
- Support flipping of orientation and guess default
orientationautomatically
from the aesthetic mapping in stat_multcomp() (**breaking** returned
variables renamed: x.left.tip into xmin and x.right.tip into xmax).
- Support flipping of orientation and guess default
orientationautomatically
from the aesthetic mapping when possible in stat_fit_tb(),
stat_fit_glance(), stat_fit_tidy() and stat_fit_augment().
- Add
stat_distrmix_area()as a wrapper onstat_distrmix_line()with
default for plotting the sum of component Normals as an area.
- Guess default
orientationautomatically from the aesthetic mapping in
stat_distrmix_line(), stat_distrmix_area() and stat_distrmix_eq().
- Identify regions of the fitted component Normal distributions and their
mixture delimited by arbitrary quantiles in stat_distrmix_line() and
stat_distrmix_area().
- Export function
find_quantiles()for the identification of regions delimited
by quantiles when mapping aesthetics in other statistics from 'ggplot2' or its
extension packages.
- Improve in
stat_distrmix_line()andstat_distrmix_area()the
behaviour with fullrange = TRUE so that it extends the prediction to cover the
scale range if broader, but never shrinks the range below that needed to
encompass >= 0.999 of the probability. Plots rendered with 'ggpmisc' (>= 1.0.0)
cover a range slightly broader than in previous versions.
- Support methods
"nls"and"onls"instat_poly_line()and
stat_poly_eq().
- Add parameter
limit.totostat_poly_line()andstat_ma_line()as an
enhancement of parameter fullrange providing full control on the newdata
used to compute the prediction line.
- Add parameters
fullrangeandlimit.totostat_quant_line()and
stat_quant_band() for consistency, adding previously lacking control over the
prediction range.
- **Breaking:** as robustness weights are just one type of posterior weights, the
returned variable robustness.weights is renamed posterior.weights.
- Add support for extraction of posterior weights for models fitted with methods
"gls", ("lme" and "nlme"). These weights are NOT scaled to values in 0..1!
- Change default from
show.legend = FALSEtoshow.legend = TRUEin
stat_fit_residuals() and stat_fit_deviations().
- Fix **bug** in support of
smatr::ma()andsmatr::sma()instat_poly_eq()
with - 1 or + 0 in formula: $x^2$ shown instead of $x$.
- Rewrite
find_spikes()with changes in behaviour and formal parameters. Old
version did not work as documented, or even usefully.
- Streamline source of documentation using 'roxygen2' inheritance and expand
and clarify explanations. List supported methods in tables in help pages.
Merge help for closely related statistics.
- Update the _User Guide_ with new/better examples and explanations including
use of new features.
- Update the documentation website of 'ggpmisc' editing existing and adding
two new articles: _Non-linear model fits_ and _Multiple comparisons_.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 54 (16 internal)includes a package overview page
- Examples that run
- 100%35 run in a plain check (1 of them under a condition)
- Exported functions with examples
- 94%
- Documented parameters
- 71%
- Return-value docs
- 69%
- Help pages citing references
- 11%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 58
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/aphalo/ggpmisc on 2026-10-21.
The R CMD check workflow runs on Windows
Dependencies
Installing ggpmisc adds 45 packages (26 with compiled code, 37 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, ggpp 2.1 MB.
Show all 19 packagesHide all 19 packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0Latest2026-07-05 · current release · diff ↗ ·
added 5 exports
StatSpikes, f_use_label, find_quantiles, stat_distrmix_area, stat_spikes - RR 4.6.0 released · 2026-04-24
- 0.7.0
- 0.6.32025-11-29 · diff ↗ ·
added 4 exports
StatDistrmixEq, StatDistrmixLine, stat_distrmix_eq, stat_distrmix_line - 0.6.2
- RR 4.5.0 released · 2025-04-11
- 0.6.12024-11-14 · diff ↗
- 0.6.02024-06-28 · diff ↗ ·
added 22 exports
S_value_label, adj_rr_label, bold_label, check_poly_formula, coefs2poly_eq, f_value_label, italic_label, mean_value_label, p_value_label, plain_label, poly2character, r_ci_label, r_label, rr_ci_label, rr_label, sd_value_label, se_value_label, sprintf_dm, t_value_label, value2char, var_value_label, z_value_label - 0.5.62024-05-07 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.5.5
- 0.5.4-1
- 0.5.3
- RR 4.3.0 released · 2023-04-21
- 0.5.22022-12-18 · diff ↗
- 0.5.1
Show 41 earlier eventsHide 41 earlier events
- 0.5.0
- 0.4.72022-06-15 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.4.62022-04-10 · diff ↗
- 0.4.52021-12-11 · diff ↗
- 0.4.4
- 0.4.3
- 0.4.2-12021-08-15 · diff ↗
- 0.4.22021-08-04 · diff ↗
- 0.4.12021-08-02 · diff ↗ ·
added 5 exports
StatQuantBand, StatQuantLine, stat_poly_line, stat_quant_band, stat_quant_line - 0.4.02021-06-03 · diff ↗ ·
removed 80 exports
GeomGrob, GeomGrobNpc, GeomLabelNpc, GeomLinkedText, GeomPlot, GeomPlotNpc, GeomQuadrantLines, GeomTable, GeomTableNpc, GeomTextNpc, GeomVHLines, GeomXMarginArrow, GeomXMarginGrob, GeomXMarginPoint, GeomYMarginArrow, GeomYMarginGrob, GeomYMarginPoint, PositionNudgeCenter, PositionNudgeLine, PositionNudgeTo, StatApplyGroup, StatApplyPanel, StatDens1dFilter, StatDens1dFilterG, StatDens1dLabels, StatDens2dFilter, StatDens2dFilterG, StatDens2dLabels, StatFmtTb, StatQuadrantCounts and 50 moreadded 2 exports
StatQuantEq, stat_quant_eq - RR 4.1.0 released · 2021-05-18
- 0.3.92021-04-04 · diff ↗ ·
added 10 exports
GeomLinkedText, PositionNudgeCenter, PositionNudgeLine, PositionNudgeTo, geom_linked_text, position_nudge_center, position_nudge_centre, position_nudge_keep, position_nudge_line, position_nudge_to - 0.3.8-12021-01-27 · diff ↗
- 0.3.82021-01-25 · diff ↗
- 0.3.72020-11-09 · diff ↗ ·
added 6 exports
StatDens1dFilter, StatDens1dFilterG, StatDens1dLabels, stat_dens1d_filter, stat_dens1d_filter_g, stat_dens1d_labels - 0.3.6
- 0.3.52020-06-01 · diff ↗ ·
added 9 exports
ttheme_gtbw, ttheme_gtdark, ttheme_gtdefault, ttheme_gtlight, ttheme_gtminimal, ttheme_gtplain, ttheme_gtsimple, ttheme_gtstripes, ttheme_set - RR 4.0.0 released · 2020-04-24
- 0.3.4
- 0.3.32019-12-02 · diff ↗
- 0.3.22019-11-11 · diff ↗ ·
added 21 exports
FC_format, FC_name, FC_plain, GeomQuadrantLines, GeomVHLines, geom_quadrant_lines, geom_vhlines, outcome2factor, scale_colour_outcome, scale_fill_outcome, scale_shape_outcome, scale_x_FDR, scale_x_Pvalue, scale_x_logFC, scale_y_FDR, scale_y_Pvalue, scale_y_logFC, symmetric_limits, threshold2factor, xy_outcomes2factor, xy_thresholds2factor - RR 3.6.0 released · 2019-04-26
- 0.3.12019-04-02 · diff ↗ ·
added 34 exports
GeomGrob, GeomGrobNpc, GeomLabelNpc, GeomPlot, GeomPlotNpc, GeomTableNpc, GeomTextNpc, GeomXMarginArrow, GeomXMarginGrob, GeomXMarginPoint, GeomYMarginArrow, GeomYMarginGrob, GeomYMarginPoint, StatApplyGroup, StatApplyPanel, compute_npcx, compute_npcy, geom_grob, geom_grob_npc, geom_label_npc, geom_plot, geom_plot_npc, geom_table_npc, geom_text_npc, geom_x_margin_arrow, geom_x_margin_grob, geom_x_margin_point, geom_y_margin_arrow, geom_y_margin_grob, geom_y_margin_point and 4 more - 0.3.02018-07-16 · diff ↗ ·
removed 19 exports
GeomDebug, GeomNull, StatDebugGroup, StatDebugPanel, StatQuadratCounts, append_layers, bottom_layer, delete_layers, extract_layers, geom_debug, geom_null, move_layers, num_layers, shift_layers, stat_debug_group, stat_debug_panel, stat_quadrat_counts, top_layer, which_layersadded 8 exports
GeomTable, StatFitTb, StatFmtTb, StatQuadrantCounts, geom_table, stat_fit_tb, stat_fmt_tb, stat_quadrant_counts - 0.2.17
- RR 3.5.0 released · 2018-04-23
- 0.2.162017-09-17 · diff ↗ ·
added 9 exports
append_layers, bottom_layer, delete_layers, extract_layers, move_layers, num_layers, shift_layers, top_layer, which_layers - 0.2.15
- RR 3.4.0 released · 2017-04-21
- 0.2.142017-02-02 · diff ↗
- 0.2.132016-11-26 · diff ↗
- 0.2.122016-10-22 · diff ↗ ·
added 6 exports
StatDens2dFilter, StatDens2dFilterG, StatDens2dLabels, stat_dens2d_filter, stat_dens2d_filter_g, stat_dens2d_labels - 0.2.10
- 0.2.92016-06-18 · diff ↗
- 0.2.82016-05-22 · diff ↗ ·
added 8 exports
StatFitAugment, StatFitDeviations, StatFitGlance, StatFitResiduals, stat_fit_augment, stat_fit_deviations, stat_fit_glance, stat_fit_residuals - RR 3.3.0 released · 2016-05-03
- 0.2.7
- 0.2.62016-02-25 · diff ↗
- 0.2.52016-01-30
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2016-01-30
- Total releases
- 45 / 10 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.2.0
- Download size
- 5.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ggpmisc")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.