Skip to content

Commit

Permalink
Merge pull request #246 from olivroy/patch-2
Browse files Browse the repository at this point in the history
Remove note about old ggplot2
  • Loading branch information
slowkow authored Jan 2, 2024
2 parents 7c68f3f + b95af50 commit 5bb8634
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions vignettes/examples.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -899,24 +899,11 @@ p + geom_label_repel(

### Label jittered points

<div class="alert alert-warning" role="alert">
**Warning:** This example will not work with ggplot2 version 2.2.1 or older.
</div>

To get the latest development version of ggplot2, try:

```{r ggplot2, echo=TRUE, eval=FALSE}
# install.packages("devtools")
devtools::install_github("tidyverse/ggplot2")
```

If your ggplot2 is newer than 2.2.1, try this example:

```{r jitter, echo=TRUE, fig.width=6, fig.height=5}
mtcars$label <- rownames(mtcars)
mtcars$label[mtcars$cyl != 6] <- ""
# New! (not available in ggplot2 version 2.2.1 or earlier)
# Available since ggplot2 2.2.1
pos <- position_jitter(width = 0.3, seed = 2)
ggplot(mtcars, aes(factor(cyl), mpg, color = label != "", label = label)) +
Expand Down

0 comments on commit 5bb8634

Please sign in to comment.