-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrap-text-automatically.R
67 lines (47 loc) · 1.09 KB
/
wrap-text-automatically.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
library(tidyverse)
library(palmerpenguins)
penguins |>
count(island) |>
ggplot(
aes(
x = island,
y = n
)
) +
geom_col() +
labs(
title = "Biscoe island has the most penguins",
subtitle = "But the other islands are still great. There are penguins living there. So hey, don't ignore those two islands, ok?"
)
penguins |>
count(island) |>
ggplot(
aes(
x = island,
y = n
)
) +
geom_col() +
labs(
title = "Biscoe island has the most penguins",
subtitle = str_wrap("But the other islands are still great. There are penguins living there. So hey, don't ignore those two islands, ok?", width = 10)
)
library(tidyverse)
library(palmerpenguins)
library(ggtext)
penguins |>
count(island) |>
ggplot(
aes(
x = island,
y = n
)
) +
geom_col() +
labs(
title = "Biscoe island has the most penguins",
subtitle = "But the other islands are still great. There are penguins living there. So hey, don't ignore those two islands, ok?"
) +
theme(
plot.subtitle = element_textbox_simple()
)