Skip to content

Commit

Permalink
Update dependence on 'ggrepel'
Browse files Browse the repository at this point in the history
Stick to currently released version.
  • Loading branch information
aphalo committed Nov 12, 2021
1 parent 1e1c4de commit 93437ae
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 37 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Suggests:
knitr (>= 1.29),
rmarkdown (>= 2.3),
gginnards(>= 0.1.0),
ggrepel (> 0.9.1),
ggrepel (>= 0.9.1),
magick (>= 2.6.0)
URL: https://docs.r4photobiology.info/ggpp/,
https://github.com/aphalo/ggpp
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ editor_options:

# ggpp 0.4.3

- Update the vignette
- Update the vignette.

# ggpp 0.4.2

Expand Down
16 changes: 9 additions & 7 deletions vignettes/grammar-extensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,17 @@ ggplot(df, aes(x, y, label = ifelse(x < 1, "", l) )) +
hjust = "left") +
expand_limits(x = 3)

## -----------------------------------------------------------------------------
## ---- eval=eval_ggrepel-------------------------------------------------------
ggplot(df, aes(x, y, label = l)) +
geom_point(color = "red", size = 3) +
geom_text(position = position_nudge_to(y = -2.5),
size = 3,
color = "red",
angle = 90,
hjust = 0,
check_overlap = TRUE) +
geom_text_repel(position = position_nudge_to(y = -2.5),
size = 3,
color = "red",
angle = 90,
hjust = 0,
box.padding = 0.1,
segment.color = NA,
direction = "x") +
geom_rug(sides = "b", length = unit(0.02, "npc"), color = "red")

## ---- eval=eval_ggrepel-------------------------------------------------------
Expand Down
16 changes: 9 additions & 7 deletions vignettes/grammar-extensions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1358,15 +1358,17 @@ We here the pass a vector of length one as argument for `y`, but `x` and `y`
also accept vectors of the same length as rows has `data`. In other words, it
allows manual positioning of text and labels.

```{r}
```{r, eval=eval_ggrepel}
ggplot(df, aes(x, y, label = l)) +
geom_point(color = "red", size = 3) +
geom_text(position = position_nudge_to(y = -2.5),
size = 3,
color = "red",
angle = 90,
hjust = 0,
check_overlap = TRUE) +
geom_text_repel(position = position_nudge_to(y = -2.5),
size = 3,
color = "red",
angle = 90,
hjust = 0,
box.padding = 0.1,
segment.color = NA,
direction = "x") +
geom_rug(sides = "b", length = unit(0.02, "npc"), color = "red")
```

Expand Down
Loading

0 comments on commit 93437ae

Please sign in to comment.