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
%use dataframe
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.7.2. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.3.2.
val iris = DataFrame.readCSV("https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/data/iris.csv")
iris.head()
DataFrame: rowsCount = 5, columnsCount = 5
sepal_length | sepal_width | petal_length | petal_width | species |
---|---|---|---|---|
5.100000 | 3.500000 | 1.400000 | 0.200000 | setosa |
4.900000 | 3.000000 | 1.400000 | 0.200000 | setosa |
4.700000 | 3.200000 | 1.300000 | 0.200000 | setosa |
4.600000 | 3.100000 | 1.500000 | 0.200000 | setosa |
5.000000 | 3.600000 | 1.400000 | 0.200000 | setosa |
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
)