- Update for compatibility with upcoming ‘ggplot2’ >= 3.5.0.
- Support the
geom_label_pairwise()matching the upcoming update to
ggplot2::geom_label()(with help from teunbrand).
- Add support for
geom_label_npc(), for consistency with
position_stack_minmax()to correctly position error bars in stacked plots.
- Add data sets
birch_dw.dfwith data for 350 birch seedlings.
- Add data set
weather_18_june_2019.dfwith data at 1 min intercal for 24 h.
- Move transcriptomics data sets
volcano_example.dffrom ‘ggpmisc’ to ‘ggpp’.
CRAN release: 2023-08-12
geom_label_pairwise()suitable for annotating/highlighting pairwise comparisons between levels of a factor mapped to the x aesthetic. They can also be used to highlight ranges of values when the variable mapped to x is a continuous numerical vector. The user interfaces are consistent with those of
- Improve handling of nudge values when dates or times are mapped to x or y.
CRAN release: 2023-07-16
- Add support for percent and fraction of observations to
- Fix bug in
stat_group_counts(): mismatch between counts and groups.
stat_functions(), a replacement for
ggplot2::stat_function()that fully complies with the grammar of graphics, supporting multiple functions per layer, grouping and facets.
- Add examples to documentation.
CRAN release: 2023-04-01
- Fix bug in
stat_dens1d_filter_g(): handle elegantly data for which density cannot be estimated (Issue #32 raised by mshubert to report bug).
type = 8when computing quantiles, instead of the default
type = 7. Type 8 is recommended as better with data that are not normally distributed.
- Add parameter
stat_dens1d_filter_g()allowing forcing the exclusion of specific observations irrespective of the local density (See issue #19, partly addressing a suggestion by mshubert).
these.targetmaking it possible to apply a function or vector of values passed through
keep.theseto any variable in the layer
data(See issue #19, partly addressing a suggestion by mshubert).
- Fix bug in segment shrinking (very rare division by zero).
- Changed default values for
colour.targetto improve consistency; now segments are never the target of colour by default.
- Add formal parameters
default.colorsas synonyms of
- Add unit tests. (See issue #10, and pull requests #12, #13, #17, #18, #21, #23, #24, #25, #26, #27, #30, #31, #34 and #38 from Daniel Sabanes Bove and his team).
- Add checks for string arguments; improve some obscure error messages.
- Track deprecation of
aes_string()in ‘ggplot2’ (>= 3.0.0).
CRAN release: 2023-02-03
- Add parameter
stat_dens1d_filter_g()allowing forcing the inclusion of specific observations irrespective of the local density (See issue #19, partly addressing a suggestion by mshubert).
stat_dens1d_filter_g()to allow separate control of kept observations or labels in each tail (1D) or in each quadrant (2D) of the density distribution, still using an estimate of the local density computed from the whole data set.
- Add parameter
stat_dens1d_filter_g()to request the local density estimate at the position of each observation to be returned in numeric variable
densityand the outcome of the test in logical variable
CRAN release: 2022-12-05
- Add parameters
- Add parameters
Code breaking. Remove support for aesthetics
geom_grob(). (Segments are links, and not meant to inform about data values on their own.)
- Add vignette “Combining repulsion and nudging” describing the plot features made possible by packages ‘ggpp’ (>= 0.5.0) and ‘ggrepel’ (>= 0.9.2) when used together.
CRAN release: 2022-09-30
- Add function
- Support the new ‘ggplot2’ aesthetic
geom_vhlines()for compatibility with ‘ggplot2’ (>= 3.3.7).
geom_label_s()to support justification computed from positions, with
hjust = "position"and
vjust = "position"as new defaults. (The current, very simple, approach will be further tested and if necessary improved for the next release.)
segment.sizeaesthetic and increase its default value, and add formal parameters
min.segment.lengthto allow adjusting the length of the segments.
position_nudge_center()for compatibility with ‘ggplot2’ (>= 3.3.7) and to ensure that every label gets nudged even if located exactly at the center (focus point of nudging).
CRAN release: 2022-04-10
Multiple grobs and grob trees sharing the same name result in only the first one being rendered. This caused problems when multiple layers created with the same geometry were added to a plot.
- Fix bug caused by grob and grob tree naming. Until unique naming is implemented, we do not assign names in cases where these potentially can interfere with rendering. This bug affected most geometries in ‘ggpp’.
CRAN release: 2021-12-17
Based on issues raised in the GitHub repository of ‘ggrepel’ and the nudge functions added some time ago to package ‘ggpp’ it became obvious that nudging can help in achieving good repulsion outcomes without need of tailored repulsion algorithms for specific cases. Obviously developing new ggplot position functions is much easier than tweaking the repulsion algorithm. It is also clear that not being able to combine nudging with stack, jitter and dodge positions made difficult to produce some types of plots. One case is replacing a key or legend with direct labels to plot elements, which is important in plots aimed at audiences outside academia.
In one of the issues in the GitHub repository of ‘ggrepel’ an answer by M. Krassowski included code that provided an elegant and simple approach to implementing combined position functions without duplicating code already in ‘ggplot2’ by instead calling methods of the parent class. I edited this code and included it in the package.
Except for the position functions with names ending in
_keep, for which normal counterparts exist, the keeping of the original position can be disabled by passing
kept.origin = "none" when they are called.
The renaming of
geom_text_s() is code breaking but I am now fairly confident this shorter name is easy to remember with
s for segment.
- Add functions
- Add functions
position_dodge2nudge()based on code by M. Krassowski for
- Revise functions
position_nudge_line()adding support for disabling keeping of the original positions.
geom_text_linked(). This is a code breaking change with respect to the previous (unstable) version.
geom_grob()to support plotting of segments when positions change, e.g., with nudging.
- Update the vignette.
With 12 new and four partly rewritten functions there is quite a lot of new code in this update, so even if tested and checked, it is possible that bugs may have slipped through. Please, do report them if you encounter any.
CRAN release: 2021-07-31
The initial implementation and user interface of three apply statistics first introduced in ‘ggpmisc’ 0.3.6 has been revised to expand their usefulness and to make them less error-prone, while the fourth one is now defunct. Note: The default argument for
stat_centroid() is likely to change in the near future. Otherwise, the three statistics can be considered now stable.
.fun.yare not passed an argument. This is a code breaking change with respect to the previous (unstable) version.
stat_centroid()to support functions that return a one row data frame, like those defined in ‘ggplot2’ to be passed as argument to parameter
ggplot2::stat_summary(), such as
stat_apply_panel(), as it was redundant. Grouping can be modified per layer when needed.
CRAN release: 2021-07-14
compute_just()to work with any value for the
angleaesthetic, as in the accepted version of the pull request in ‘ggplot2’.
Fix bug in
geom_table()that would cause text left or right justified to be clipped when the text in a cell was very long (reported by dryguy). (Cell padding still needs improvement.)
CRAN release: 2021-05-28
This new package is the result of splitting package ‘ggpmisc’ into two packages: ‘ggpp’ containing extensions to the grammar of graphics and ‘ggpmisc’ containing extensions to ‘ggplot2’ related to plot decorations based on model fits, statistical summaries and other descriptors of the data being plotted. Package ‘ggpmisc’ depends on ‘ggpp’ with no visible changes for users. Package ‘ggpp’ can be loaded instead of ‘ggpmisc’ when only the extensions it contains are needed. Package ‘gginnards’ containing tools for editing ggplot objects as well as tools for inspecting them is an earlier spin-off from ‘gpmisc’.
Compared to ‘ggpmisc’ 0.3.9, the following changes have been introduced. New justification styles have being implemented to complement
position_nudge_center() . They are supported in
geom_marging_grob(). In the current implementation all rows in
data should contain the same
vjust value when using the new types of justification described here, this seems reasonable as they compute the individual justification values from the data. All other justification values, either
character do not have this restriction and can be used as in geoms from ‘ggplot2’. These new features may change in the near future.
- Implement justifications
"inward_median"so that outward and inward are with respect to the centroid of the data instead of to the middle of the x or y scales. This should be useful in combination with
- Implement justifications
"inward_nnn"so that outward and inward are with respect to the number resulting from applying
as.numeric()to the characters that replace
nnn. For example strings like
"outward_-3e-2"are supported. This should be useful when manual tweaking is desired. As special cases
"inward_0"apply justification outward and inward with respect to the origin. This should be useful for biplots used for PCA and similar cases with arrows radiating out of the origin. (The
"inward"justification implemented in ‘ggplot2’ is relative to the middle of the x or y scales.)
compute_npcy()to support multiple steps per group (needed in ‘ggpmisc’).
- Fix problem related to
"inward"justification of text labels when
angleaesthetic takes values < -45 or > 45 degrees. This code change alters how old plots are rendered if text labels have been rotated by more than 45 degrees.
- ‘ggplot2’, ‘ggrepel’: The problem with angle was a “bug” in ‘ggplot2’ also present in ‘ggrepel’. A pull request for
ggplot2::geom_text()has been submitted and merged. This is now in the ‘ggplot2’ 3.3.4 milestone retaining consistent behaviour between ‘ggplot2’, ‘ggrepel’, ‘ggpp’ and ‘ggpmisc’.