%useLatestDescriptors
%use dataframe
%use lets-plot
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.9.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.5.1.
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" }
p + geomViolin() + ggtitle("Basic demo")
p + geomViolin(showHalf = -1) { fill = "species" } +
geomViolin(showHalf = 1, fill = "#ffffb2") +
ggtitle("half violins")