tailsCutoff
parameter for geomViolin()
¶Parameter tailsCutoff
extends domain of each violin if trim=false
.
Accepts float values, by default tailsCutoff=3.0
.
%useLatestDescriptors
%use lets-plot
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.2.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.3.0.0.
%use krangl
val iris = DataFrame.readCSV("https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/data/iris.csv")
iris.head()
sepal_length | sepal_width | petal_length | petal_width | species |
---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | setosa |
4.9 | 3.0 | 1.4 | 0.2 | setosa |
4.7 | 3.2 | 1.3 | 0.2 | setosa |
4.6 | 3.1 | 1.5 | 0.2 | setosa |
5.0 | 3.6 | 1.4 | 0.2 | setosa |
Shape: 5 x 5.
val p = letsPlot(iris.toMap()) { x = "species"; y = "sepal_length" }
gggrid(
plots = listOf(
p + geomViolin(trim = true) + ggtitle("trim=true (default)"),
p + geomViolin(trim = false, tailsCutoff = 1) + ggtitle("trim=false, tailsCutoff=1"),
p + geomViolin(trim = false, tailsCutoff = 2) + ggtitle("trim=false, tailsCutoff=2"),
p + geomViolin(trim = false, tailsCutoff = 3) + ggtitle("trim=false, tailsCutoff=3 (default)"),
),
ncol = 2,
cellWidth = 400,
cellHeight = 300
)