@@ -1611,14 +1611,12 @@ mpg
16111611
16121612; ; ## Layers
16131613; ;
1614- ; ; `lay` (defined in [Composing Views](#composing-views)) applies one or
1615- ; ; more layers to the same base views. Multiple layers duplicate each
1616- ; ; view -- once per layer. Annotation layers (hline, vline, hband) are
1617- ; ; kept as separate views.
1614+ ; ; Multiple layers duplicate the views -- here's what that looks like
1615+ ; ; internally, and how it renders.
16181616
16191617; ; ### 🧪 What `lay` Produces
16201618; ;
1621- ; ; Base views duplicated, each copy with a different layer :
1619+ ; ; Each layer gets its own copy of every base view :
16221620
16231621(-> (view iris [[:sepal-length :sepal-width ]])
16241622 (lay (point ) (line ))
@@ -1892,7 +1890,6 @@ mpg
18921890 (let [{:keys [all-colors sx sy coord-px position cfg]} ctx
18931891 cfg (or cfg defaults )
18941892 bw (ws/data sx :bandwidth )
1895- n-colors (count (:bars stat))
18961893 cum-y (atom {})
18971894 active-map (when (= position :dodge )
18981895 (into {}
@@ -2139,6 +2136,15 @@ mpg
21392136 (when-off-diagonal #(lay % (point ) (lm ))))]
21402137 (mapv #(select-keys % [:x :y :mark :stat ]) vs))
21412138
2139+ ; ; `where` and `where-not` filter views by predicate -- useful for
2140+ ; ; keeping only certain column pairings:
2141+
2142+ (-> iris
2143+ (view (cross [:sepal-length :sepal-width :petal-length ]
2144+ [:sepal-length :sepal-width :petal-length ]))
2145+ (where-not diagonal?)
2146+ count)
2147+
21422148; ; ### ⚙️ Column-Pair Helpers
21432149
21442150(defn distribution
0 commit comments