After the previous major update to ‘ggpmisc’ (0.3.0), a follow up (0.3.1) with multiple new features and smoothed rough edges for some of the features added in version 3.0.0. Package documentation is available at https://docs.r4photobiology.info/ggpmisc/ as a web site.
The enhancements in this and the previous update to ‘ggpmisc’ are made possible by changes to ‘ggplot2’ (>= 3.0.0) made while adding support for sf (simple features).
The functions in ‘ggpmisc’ (>= 0.3.1) are related to different kinds of annotations and insets in ggplots. Annotations of plots with fitted-model equations, fit diagnosis, ANOVA and summary tables, highlighting and labelling of peaks and valleys in curves, and local density-based highlighting or labelling in scatter plots. Additionally specializations of the
ggplot() constructor allow on-the-fly conversion of time-series. Two new geoms join
geom_table() added in version 0.3.0,
geom_grob(). These three geoms make it possible to add tables, ggplots and arbitrary graphical objects (grobs) as insets to plots respecting the the Grammar of Graphics paradigm.
A set of new geometries produce marginal annotations:
Another novel feature is based on the addition of two new aesthetics
npcy, the corresponding scales
scale_npcy_continuous(), and several new geometries that make use of then:
geom_grob_npc(). These allow to position insets and annotations relative to the dimensions of the plotting area instead of using native data units. Using
"npc" units is more natural for labels or insets that are not directly related to data but that look better if positioned consistently across multiple panels or multiple separately produced plots. One improvement to the stats from earlier versions of ‘ggpmisc’ is the use of these new geoms to achieve more consistent location for insets and labels.
As in the announcement of the previous version, I have included some example plots taken from the documentation of the package. In all cases annotations are generated automatically, but formatting is flexible.
NOTE: The new version of ‘ggpmisc’ will be soon submitted to CRAN .