Skip to content

Commit 87bcf13

Browse files
committed
add more examples
1 parent ca619d4 commit 87bcf13

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

doc/syntax/layer/type/violin.qmd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,16 @@ To achieve this outcome, you can set the `side` setting and adjust `width` to ta
117117
VISUALISE Temp AS x, Month AS y FROM ggsql:airquality
118118
DRAW violin SETTING width => 4, side => 'top'
119119
SCALE ORDINAL y
120-
```
120+
```
121+
122+
The same facilities can be used to create violins where each side encode different subsets
123+
124+
```{ggsql}
125+
VISUALISE body_mass AS y, species AS x, sex AS fill FROM ggsql:penguins
126+
DRAW violin
127+
SETTING side => 'left'
128+
FILTER sex = 'male'
129+
DRAW violin
130+
SETTING side => 'right'
131+
FILTER sex = 'female'
132+
```

0 commit comments

Comments
 (0)