Skip to content

Instantly share code, notes, and snippets.

@carolosf
Last active January 4, 2022 14:58
Show Gist options
  • Save carolosf/0b44d242920cec28b8fe01140bad1140 to your computer and use it in GitHub Desktop.
Save carolosf/0b44d242920cec28b8fe01140bad1140 to your computer and use it in GitHub Desktop.
kotlin jupyter lets plot simple line and bar charts
%useLatestDescriptors
%use lets-plot
%use krangl
val m = mapOf<String,List<Int>>("x" to listOf(1,2,3), "y" to listOf(3,4,3))
val p = letsPlot(m) + theme(axisTitleX="blank")
val plot = p +
geomBar(color="#579673", stat = Stat.identity) {
x = "x"
y = "y"
} +
geomLine(color="red") {
x = "x"
y = "y"
} +
ggsize(750, 300)
plot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment