Skip to content

Commit a0dde8a

Browse files
committed
tableplot param flow wip
1 parent b0927f9 commit a0dde8a

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/data_visualization/tableplot_parameter_flow.clj

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:category :clojure
66
:type :post
77
:draft true
8-
:date "2025-11-10"
8+
:date "2025-11-11"
99
:tags [:data-visualization :tableplot :tutorial]
1010
:image "tableplot-parameter-flow.png"}}}
1111
(ns data-visualization.tableplot-parameter-flow
@@ -240,9 +240,11 @@
240240
;; [It's just data](https://www.youtube.com/watch?v=jlPaby7suOc&t=1000s).
241241

242242
;; We do not need to use Tableplot's API for everything.
243-
;;
244-
;; After we call `plotly/plot`, we can process the actual Plotly.js
245-
;; specification, as data.
243+
;; We can call [`plotly/plot`](https://scicloj.github.io/tableplot/tableplot_book.plotly_reference.html#plot)
244+
;; to realize the actual Plotly.js specification, as data.
245+
;; Then we can keep processing it using the Clojure standard library,
246+
;; which has lovely functions like
247+
;; [`assoc-in`](https://clojuredocs.org/clojure.core/assoc-in).
246248

247249
(-> sample-data
248250
(plotly/layer-point {:=mark-size 20})
@@ -254,7 +256,15 @@
254256
;; ::: {.callout-tip collapse="true"}
255257
;; ### A brief look inside
256258

257-
;; You already know what to expect here:
259+
;; Let us observe the transformation -- before and after the `assoc-in`:
260+
261+
(-> sample-data
262+
(plotly/layer-point {:=mark-size 20})
263+
plotly/layer-line
264+
plotly/plot
265+
(assoc-in [:layout :xaxis :gridcolor] "green")
266+
(assoc-in [:layout :yaxis :gridcolor] "red")
267+
kind/pprint)
258268

259269
(-> sample-data
260270
(plotly/layer-point {:=mark-size 20})

0 commit comments

Comments
 (0)