You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;; a brilliant concept from the [Hanami](https://github.com/jsa-aerial/hanami) library.
78
80
79
81
;; This is not the resulting Plotly.js specification yet.
80
-
;; It is a potential for it, specifiying lots of partial intermediate
81
-
;; values, called susbsitution keys.
82
-
;; By Tableplot's convetion, substitution keys will be keywords beginning with `=`,
83
-
;; such as `:=layout` or `:=mark-color`.
84
-
;; They can have default values, which can also be functions computing
82
+
;; It is a potential for it, specifying lots of partial intermediate
83
+
;; values, called substitution keys.
84
+
;; By Tableplot's convention, substitution keys are keywords beginning with `=`,
85
+
;; such as `:=layout` or `:=mark-color`.
86
+
;;
87
+
;; **Why templates?** They separate *what you want* (data mappings, colors, sizes)
88
+
;; from *how to render it* (the actual Plotly.js specification). This gives you
89
+
;; flexibility: you can override specific details or let defaults handle everything.
90
+
;;
91
+
;; Substitution keys can have default values, which can also be functions computing
85
92
;; them from the values defined by other keys. On the user side,
86
93
;; we may override any of these, as we'll see below.
87
94
@@ -96,7 +103,7 @@ sample-data
96
103
;; ## Using the relevant substitution keys
97
104
98
105
;; Sometimes, what we need can be precisely specified in Tableplot.
99
-
;; You may find the following in Tabelplot's
106
+
;; You may find the following in Tableplot's
100
107
;; [Plotly API reference](https://scicloj.github.io/tableplot/tableplot_book.plotly_reference.html#yaxis-gridcolor):
101
108
102
109
;; - [`:=xaxis-gridcolor`](https://scicloj.github.io/tableplot/tableplot_book.plotly_reference.html#xaxis-gridcolor) - The color for the x axis grid lines
@@ -111,6 +118,8 @@ sample-data
111
118
plotly/layer-line)
112
119
113
120
;; ### A brief look inside
121
+
;;
122
+
;; *(can skip on first read)*
114
123
115
124
;; Let us see what actually has changed in the
116
125
;; resulting specification:
@@ -124,8 +133,8 @@ sample-data
124
133
125
134
;; ## Overriding a broader-scope key
126
135
127
-
;; Sometimes, you will not find exactly what you need in Tabeplot's
128
-
;; prarameter system. Plotly.js itself will always be richer and more
136
+
;; Sometimes, you will not find exactly what you need in Tableplot's
137
+
;; parameter system. Plotly.js itself will always be richer and more
129
138
;; flexible.
130
139
131
140
;; Imagine that the above `:=xaxis-gridcolor` & `:=yaxis-gridcolor` would
@@ -142,12 +151,6 @@ sample-data
142
151
143
152
;; - [`:=layout`](https://scicloj.github.io/tableplot/tableplot_book.plotly_reference.html#layout) - The layout part of the resulting Plotly.js specification
144
153
145
-
;; By the way, if you read further in that link to the docs, you will see
146
-
;; that `:=layout` depends on `:=xaxis-gridcolor` and `:=yaxis-gridcolor`,
147
-
;; among other things. When we specified those narrow-scope keys
148
-
;; in our previous example, we actually went through affecting the
0 commit comments