Skip to content

Commit 7a31f84

Browse files
pjt222claude
andcommitted
fix: use theme_puzzle() in README image generation to render visible puzzles
theme_void() was stripping all graphical elements, producing blank white PNGs. Replaced all 11 instances with theme_puzzle() and regenerated all 8 images. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9f2889d commit 7a31f84

9 files changed

Lines changed: 11 additions & 11 deletions

inst/scripts/generate_readme_images.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ geom_puzzle_rect(
2323
) +
2424
scale_fill_viridis_c(option = "plasma", guide = "none") +
2525
coord_fixed() +
26-
theme_void() +
26+
theme_puzzle() +
2727
labs(title = "Rectangular")
2828

2929
p_hex <- ggplot() +
@@ -33,7 +33,7 @@ p_hex <- ggplot() +
3333
) +
3434
scale_fill_viridis_c(option = "viridis", guide = "none") +
3535
coord_fixed() +
36-
theme_void() +
36+
theme_puzzle() +
3737
labs(title = "Hexagonal")
3838

3939
p_conc <- ggplot() +
@@ -43,7 +43,7 @@ p_conc <- ggplot() +
4343
) +
4444
scale_fill_viridis_c(option = "magma", guide = "none") +
4545
coord_fixed() +
46-
theme_void() +
46+
theme_puzzle() +
4747
labs(title = "Concentric")
4848

4949
p_vor <- ggplot() +
@@ -53,7 +53,7 @@ p_vor <- ggplot() +
5353
) +
5454
scale_fill_viridis_c(option = "turbo", guide = "none") +
5555
coord_fixed() +
56-
theme_void() +
56+
theme_puzzle() +
5757
labs(title = "Voronoi")
5858

5959
hero <- (p_rect | p_hex) / (p_conc | p_vor) +
@@ -80,7 +80,7 @@ p_quickstart <- ggplot() +
8080
) +
8181
scale_fill_viridis_c(option = "plasma", guide = "none") +
8282
coord_fixed() +
83-
theme_void()
83+
theme_puzzle()
8484

8585
ggsave(
8686
file.path(out_dir, "readme-quickstart.png"),
@@ -99,7 +99,7 @@ p_ggpuzzle <- ggplot() +
9999
) +
100100
scale_fill_viridis_c(option = "turbo") +
101101
coord_fixed() +
102-
theme_void() +
102+
theme_puzzle() +
103103
theme(legend.position = "right")
104104

105105
ggsave(
@@ -116,27 +116,27 @@ thumbnails <- list(
116116
rectangular = ggplot() +
117117
geom_puzzle_rect(aes(fill = after_stat(piece_id)), cols = 4, rows = 3, seed = 42) +
118118
scale_fill_viridis_c(option = "plasma", guide = "none") +
119-
coord_fixed() + theme_void(),
119+
coord_fixed() + theme_puzzle(),
120120

121121
hexagonal = ggplot() +
122122
geom_puzzle_hex(aes(fill = after_stat(piece_id)), rings = 3, seed = 42) +
123123
scale_fill_viridis_c(option = "viridis", guide = "none") +
124-
coord_fixed() + theme_void(),
124+
coord_fixed() + theme_puzzle(),
125125

126126
concentric = ggplot() +
127127
geom_puzzle_conc(aes(fill = after_stat(ring)), rings = 3, seed = 42) +
128128
scale_fill_viridis_c(option = "magma", guide = "none") +
129-
coord_fixed() + theme_void(),
129+
coord_fixed() + theme_puzzle(),
130130

131131
voronoi = ggplot() +
132132
geom_puzzle_voronoi(aes(fill = after_stat(piece_id)), n_cells = 20, seed = 42) +
133133
scale_fill_viridis_c(option = "turbo", guide = "none") +
134-
coord_fixed() + theme_void(),
134+
coord_fixed() + theme_puzzle(),
135135

136136
random = ggplot() +
137137
geom_puzzle_random(aes(fill = after_stat(piece_id)), n_pieces = 15, seed = 42) +
138138
scale_fill_viridis_c(option = "inferno", guide = "none") +
139-
coord_fixed() + theme_void()
139+
coord_fixed() + theme_puzzle()
140140
)
141141

142142
for (name in names(thumbnails)) {

man/figures/readme-ggpuzzle.png

47.3 KB
Loading

man/figures/readme-hero.png

201 KB
Loading

man/figures/readme-quickstart.png

64.3 KB
Loading

man/figures/thumb-concentric.png

27.4 KB
Loading

man/figures/thumb-hexagonal.png

29.1 KB
Loading

man/figures/thumb-random.png

42.3 KB
Loading

man/figures/thumb-rectangular.png

13.8 KB
Loading

man/figures/thumb-voronoi.png

25.5 KB
Loading

0 commit comments

Comments
 (0)