|
342 | 342 |
|
343 | 343 | ;; Nested structure requires a custom `merge-layer` function. Not ideal. |
344 | 344 |
|
345 | | -;; ### 📖 The Solution: Flat Structure with Disticnctive Keys |
| 345 | +;; ### 📖 The Solution: Flat Structure with Distinctive Keys |
346 | 346 |
|
347 | 347 | (def flat-layer-example |
348 | 348 | {:=data {:bill-length-mm [39.1 39.5 40.3] |
@@ -1300,7 +1300,10 @@ mtcars |
1300 | 1300 |
|
1301 | 1301 | iris |
1302 | 1302 |
|
1303 | | -;; # Constants |
| 1303 | +;; # Visual Theme Constants |
| 1304 | +;; |
| 1305 | +;; These constants define the ggplot2-compatible visual theme used across |
| 1306 | +;; all rendering targets. Extracted here for maintainability. |
1304 | 1307 |
|
1305 | 1308 | ;; ggplot2-compatible color palette for categorical variables |
1306 | 1309 | (def ggplot2-colors |
@@ -2027,6 +2030,8 @@ iris |
2027 | 2030 |
|
2028 | 2031 | (kind/html (svg/serialize svg-elem)))))) |
2029 | 2032 |
|
| 2033 | +;; We now have enough implementation to show basic scatter plots. |
| 2034 | + |
2030 | 2035 | ;; # Basic Scatter Plots |
2031 | 2036 | ;; |
2032 | 2037 | ;; Simple scatter plots demonstrating the core API. |
@@ -2261,6 +2266,8 @@ iris |
2261 | 2266 | ;; Notice: Type inference is instant (O(1) lookup from Tablecloth metadata), |
2262 | 2267 | ;; not O(n) value examination. |
2263 | 2268 |
|
| 2269 | +;; With linear regression implemented, we can overlay trend lines. |
| 2270 | + |
2264 | 2271 | ;; # Linear Regression |
2265 | 2272 | ;; |
2266 | 2273 | ;; Statistical transformation: computing and overlaying regression lines. |
@@ -2448,6 +2455,8 @@ iris |
2448 | 2455 | (and (map? (meta rendered)) |
2449 | 2456 | (= (:kindly/kind (meta rendered)) :kind/html))))]) |
2450 | 2457 |
|
| 2458 | +;; Histograms demonstrate statistical transforms that derive new data from the input. |
| 2459 | + |
2451 | 2460 | ;; # Histograms |
2452 | 2461 | ;; |
2453 | 2462 | ;; Statistical transformation: binning continuous data and counting occurrences. |
@@ -3651,6 +3660,8 @@ iris |
3651 | 3660 | ;; - Minimal delegation keeps implementation focused |
3652 | 3661 | ;; - Backend-agnostic IR enables multiple rendering strategies |
3653 | 3662 |
|
| 3663 | +;; Now we can demonstrate multi-target rendering with the same spec. |
| 3664 | + |
3654 | 3665 | ;; # Plotly.js Target Examples |
3655 | 3666 | ;; |
3656 | 3667 | ;; Now let's explore the `:plotly` target, which provides interactivity |
|
0 commit comments