Skip to contents

ggpp 0.5.8-1

CRAN release: 2024-07-01

  • Fix wrong test for availability of ‘gginnards’ in examples (reported by Joshua Ulrich in issue #53).
  • Add to vignette Combining repulsion and nudging three missing tests for availability of package ‘ggrepel’.
  • Revise position_nudge_to() to support expansion and contraction of the range within which to spread the positions.

ggpp 0.5.7

CRAN release: 2024-05-06

Track changes in ‘ggplot2’ 3.5.0 and 3,5,1. Fix a couple of minor incompatibilities. Add some new features matching those new in ‘ggplot2’. General improvements and bug fixes.

ggpp 0.5.6

CRAN release: 2024-01-09

  • Fix bug in stat_density2d_filter().
  • Fix bug in position_dodgenudge(), behaviour like position_dodge2nudge().
  • Improve handling of nudging with x or y nudge vectors longer than one but shorter than the number of rows in data by reordering them based on the ordering of the data values to which they are applied.

ggpp 0.5.5

CRAN release: 2023-11-07

ggpp 0.5.4

CRAN release: 2023-08-12

  • Add geom_text_pairwise() and 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 geom_text_s() and geom_label_s().
  • Improve handling of nudge values when dates or times are mapped to x or y.

ggpp 0.5.3

CRAN release: 2023-07-16

ggpp 0.5.2

CRAN release: 2023-04-01

ggpp 0.5.1

CRAN release: 2023-02-03

ggpp 0.5.0

CRAN release: 2022-12-05

ggpp 0.4.5

CRAN release: 2022-09-30

  • Add function dark_or_light().
  • Support the new ‘ggplot2’ aesthetic linewidth in geom_quadrant_lines() and geom_vhlines() for compatibility with ‘ggplot2’ (>= 3.3.7).
  • Update geom_text_s() and 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.)
  • Update geom_text_s() and geom_label_s() to enable segment.size aesthetic and increase its default value, and add formal parameters point.padding, box.padding and min.segment.length to allow adjusting the length of the segments.
  • Update 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).

ggpp 0.4.4

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’.

ggpp 0.4.3

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_linked() to geom_text_s() is code breaking but I am now fairly confident this shorter name is easy to remember with s for segment.

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.

ggpp 0.4.2

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 geom instat_centroid() is likely to change in the near future. Otherwise, the three statistics can be considered now stable.

  • Update stat_apply_group() to support summary functions like quantile() that return vectors with more than one value but shorter than the original number of observations.

  • Update stat_summary_xy() and stat_apply_group() to return NA in x and/or y when .fun.x or .fun.y are not passed an argument. This is a code breaking change with respect to the previous (unstable) version.

  • Update stat_summary_xy() and stat_centroid() to support functions that return a one row data frame, like those defined in ‘ggplot2’ to be passed as argument to parameter fun.data of ggplot2::stat_summary(), such as mean_se, mean_cl_boot , etc.

  • Fix bug in stat_centroid(), stat_summary_xy() and stat_apply_group() resulting in the return of a long data frame with NA values instead of a data frame with fewer rows.

  • Remove stat_apply_panel() , as it was redundant. Grouping can be modified per layer when needed.

ggpp 0.4.1

CRAN release: 2021-07-14

  • Update compute_just2D() and compute_just() to work with any value for the angle aesthetic, 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.)

ggpp 0.4.0

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_text_s(), geom_plot(), geom_table(), geom_grob() and geom_marging_grob(). In the current implementation all rows in data should contain the same hjust or 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 numeric or character do not have this restriction and can be used as in geoms from ‘ggplot2’. These new features may change in the near future.

  • Rename geom_linked_text() into geom_text_linked().
  • Implement justifications "outward_mean" , "inward_mean" , "outward_median" and "inward_median" so that outward and inward are with respect to the centroid of the data instead of to the middle of the xx or yy scales. This should be useful in combination with position_nudge_center().
  • Implement justifications "outward_nnn" and "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_0.5" , "inward_3e5" or "outward_-3e-2" are supported. This should be useful when manual tweaking is desired. As special cases "outward_0" and "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 "outward" and "inward" justification implemented in ‘ggplot2’ is relative to the middle of the xx or yy scales.)
  • Revise compute_npcx() and compute_npcy() to support multiple steps per group (needed in ‘ggpmisc’).
  • Fix problem related to "outward" and "inward" justification of text labels when angle aesthetic 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’.