%useLatestDescriptors
%use lets-plot
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.10.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.6.1.
val rand = java.util.Random(37)
val data = mapOf (
"rating" to List(200) { rand.nextGaussian() } + List(200) { rand.nextGaussian() * 1.5 + 1 },
"cond" to List(200) { "A" } + List(200) { "B" }
)
letsPlot(data) { x = "rating"; fill = "cond" } + ggsize(700, 300) +
geomDensity(color = "dark_green", alpha = .7) + scaleFillBrewer(type = "seq") +
theme(panelGridMajorX = "blank")