We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 65101fa + 05c4331 commit cf8ab09Copy full SHA for cf8ab09
src/data_visualization/aog_in_clojure_part1.clj
@@ -2845,11 +2845,22 @@ iris
2845
;; regressions for each (species × island) combination.
2846
2847
(facet (=* (data penguins)
2848
- (mapping :bill-length-mm :bill-depth-mm {:color :species})
+ (mapping :bill-length-mm
2849
+ :bill-depth-mm
2850
+ {:color :species})
2851
(=+ (scatter {:alpha 0.5})
2852
(linear)))
2853
{:col :island})
2854
2855
+;; equivalently:
2856
+(-> (data penguins)
2857
2858
2859
2860
+ (=+ (scatter {:alpha 0.5})
2861
+ (linear))
2862
+ (facet {:col :island}))
2863
+
2864
(kind/test-last [#(and (= (count %) 2)
2865
(= (:=col (first %)) :island)
2866
(= (:=color (first %)) :species))])
0 commit comments