Skip to content

Commit a7e4a0c

Browse files
committed
Remove old news example that uses tidyr
1 parent 4c86a79 commit a7e4a0c

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

vignettes/releases/ggplot2-2.0.0.Rmd

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,22 +223,7 @@ ggplot(data, aes(mpg, disp)) +
223223
facet_grid(am ~ gear, switch = "both")
224224
```
225225

226-
This is especially useful when the labels directly characterise the axes. In that situation, switching the labels can make the plot clearer and more readable. You may also want to use a neutral label background by setting `strip.background` to `element_blank()`:
227-
228-
```{r}
229-
data <- mtcars %>%
230-
mutate(
231-
Logarithmic = log(mpg),
232-
Inverse = 1 / mpg,
233-
Cubic = mpg ^ 3,
234-
Original = mpg
235-
) %>% tidyr::gather(transformation, mpg2, Logarithmic:Original)
236-
237-
ggplot(data, aes(mpg2, disp)) +
238-
geom_point() +
239-
facet_wrap(~transformation, scales = "free", switch = "x") +
240-
theme(strip.background = element_blank())
241-
```
226+
This is especially useful when the labels directly characterise the axes. In that situation, switching the labels can make the plot clearer and more readable. You may also want to use a neutral label background by setting `strip.background` to `element_blank()`.
242227

243228
### Wrap labeller
244229

0 commit comments

Comments
 (0)