Compare commits

...

8 commits

Author SHA1 Message Date
1d44dabf58 Merge pull request 'Align battleships on shared coordinates' (#3) from chapter-update into main
All checks were successful
Build and deploy the book / book (push) Successful in 6s
Reviewed-on: #3
2026-08-21 08:09:22 +00:00
Simon
cbbce66fe4 merge main with chapter
All checks were successful
Build and deploy the book / book (push) Successful in 5s
Build and deploy the book / book (pull_request) Successful in 5s
2026-08-21 08:00:26 +01:00
Simon
ba8aff77a4 Refine battleship column spacing
All checks were successful
Build and deploy the book / book (push) Successful in 5s
Build and deploy the book / book (pull_request) Successful in 5s
2026-08-20 20:21:18 +01:00
Simon
406eab8fd7 better white fillings 2026-08-20 20:15:28 +01:00
Simon
9dc0427f33 Align battleships on shared coordinates
All checks were successful
Build and deploy the book / book (push) Successful in 5s
Build and deploy the book / book (pull_request) Successful in 5s
2026-08-20 20:05:35 +01:00
Simon
d99684061f minor esthetics change on chapter 6 figures
All checks were successful
Build and deploy the book / book (push) Successful in 5s
Build and deploy the book / book (pull_request) Successful in 5s
2026-08-20 11:24:05 +01:00
Simon
3f396c1492 Refine pottery seriation figure
All checks were successful
Build and deploy the book / book (push) Successful in 5s
2026-08-20 11:22:31 +01:00
Simon
77cead08b4 Refine pottery seriation figure 2026-08-20 11:21:41 +01:00

View file

@ -61,11 +61,11 @@ series_col <- ncol(dt)
n_phase <- nrow(dt) n_phase <- nrow(dt)
phase_axis <- seq_len(n_phase) phase_axis <- seq_len(n_phase)
phase_labels <- rownames(dt) phase_labels <- rownames(dt)
series_max <- apply(dt, 2, max) series_center <- seq_len(series_col)
ship_gap <- max(dt) * 0.08 max_ship_width <- 3.5
series_left <- c(0, cumsum(series_max[-series_col] + ship_gap)) ship_widths <- as.matrix(dt) / max(dt[, "Corrugated"]) * max_ship_width
series_center <- series_left + series_max / 2 plot_left <- series_center[3] - max_ship_width / 2
plot_right <- series_left[series_col] + series_max[series_col] plot_right <- series_center[3] + max_ship_width / 2
par(las = 1, bty = "n", mar = c(1, 7, 3, 1), xpd = NA) par(las = 1, bty = "n", mar = c(1, 7, 3, 1), xpd = NA)
plot( plot(
@ -81,7 +81,7 @@ for (s in seq_len(series_col)) {
for (r in phase_axis) { for (r in phase_axis) {
chip_bottom <- (n_phase - r) + 0.55 chip_bottom <- (n_phase - r) + 0.55
chip_top <- (n_phase - r) + 1.45 chip_top <- (n_phase - r) + 1.45
chip_width <- dt[r, s] chip_width <- ship_widths[r, s]
rect( rect(
series_center[s] - chip_width / 2, series_center[s] - chip_width / 2,