Playground for testing things like the MD syntax
Go to file
Johannes Frohnmeyer 3134ddff82 „README.ipynb“ ändern 2023-04-09 14:52:22 +02:00
some/path „some/path/Example.md“ ändern 2023-03-11 14:56:21 +01:00
LICENSE Initial commit 2023-03-11 14:38:32 +01:00
README.ipynb „README.ipynb“ ändern 2023-04-09 14:52:22 +02:00

README.ipynb

In [8]:
%use lets-plot
In [9]:
val data = mapOf(
    "cat1" to listOf("a", "a", "b", "a", "a", "a", "a", "b", "b", "b", "b"),
    "cat2" to listOf("c", "c", "d", "d", "d", "c", "c", "d", "c", "c", "d")
)
val p = letsPlot(data)
In [10]:
val layer = geomBar {
    x = "cat1"
    fill = "cat2"
}

(p + layer)
Out[10]:
In [11]:
val rand = java.util.Random(1024)
val data = mapOf (
    "rating" to List(200) { rand.nextGaussian() } + List(200) { rand.nextGaussian() * 1.5 + 1.5 },
    "cond" to List(200) { "A" } + List(200) { "B" }
)
var p = letsPlot(data)
In [12]:
p += geomDensity(color="dark_green", alpha=.3) {x="rating"; fill="cond"}
p + ggsize(700, 350)
Out[12]:
In [13]: