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
Copy file name to clipboardExpand all lines: doc/syntax/layer/type/boxplot.qmd
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,12 @@ Boxplots display a summary of a continuous distribution. In the style of Tukey,
9
9
The following aesthetics are recognised by the boxplot layer.
10
10
11
11
### Required
12
-
* Primary axis (e.g. `x`): The categorical variable to group by
13
12
* Secondary axis (e.g. `y`): The continuous variable to summarize
14
13
15
14
### Optional
15
+
* Primary axis (e.g. `x`): The categorical variable to group by. If omitted a
16
+
single boxplot is drawn for the whole distribution and the (one-tick)
17
+
categorical axis is hidden.
16
18
*`stroke`: The colour of the box contours, whiskers, median line and outliers.
17
19
*`fill`: The colour of the box interior.
18
20
*`colour`: Shorthand for setting `stroke` and `fill` simultaneously. Note that the median line will have bad visibility if `stroke` and `fill` are the same.
@@ -96,6 +98,15 @@ DRAW boxplot
96
98
MAPPING species AS y, bill_len AS x
97
99
```
98
100
101
+
Omit the categorical axis to summarise the whole distribution as a single
102
+
boxplot:
103
+
104
+
```{ggsql}
105
+
VISUALISE FROM ggsql:penguins
106
+
DRAW boxplot
107
+
MAPPING bill_len AS y
108
+
```
109
+
99
110
Pair a half-violin with a half-boxplot on the same category by setting opposite `side` values:
0 commit comments