File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 :description " Learn how to customize Tableplot visualizations using substitution parameters."
55 :category :clojure
66 :type :post
7- :draft true
8- :date " 2025-11-10"
7+ :date " 2025-11-11"
98 :tags [:data-visualization :tableplot :tutorial ]
109 :image " tableplot-parameter-flow.png" }}}
1110(ns data-visualization.tableplot-parameter-flow
240239; ; [It's just data](https://www.youtube.com/watch?v=jlPaby7suOc&t=1000s).
241240
242241; ; 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.
242+ ; ; We can call [`plotly/plot`](https://scicloj.github.io/tableplot/tableplot_book.plotly_reference.html#plot)
243+ ; ; to realize the actual Plotly.js specification, as data.
244+ ; ; Then we can keep processing it using the Clojure standard library,
245+ ; ; which has lovely functions like
246+ ; ; [`assoc-in`](https://clojuredocs.org/clojure.core/assoc-in).
246247
247248(-> sample-data
248249 (plotly/layer-point {:=mark-size 20 })
254255; ; ::: {.callout-tip collapse="true"}
255256; ; ### A brief look inside
256257
257- ; ; You already know what to expect here:
258+ ; ; Let us observe the transformation -- before and after the `assoc-in`:
259+
260+ (-> sample-data
261+ (plotly/layer-point {:=mark-size 20 })
262+ plotly/layer-line
263+ plotly/plot
264+ (assoc-in [:layout :xaxis :gridcolor ] " green" )
265+ (assoc-in [:layout :yaxis :gridcolor ] " red" )
266+ kind/pprint)
258267
259268(-> sample-data
260269 (plotly/layer-point {:=mark-size 20 })
You can’t perform that action at this time.
0 commit comments