Skip to content
No description, website, or topics provided.
HTML Kotlin CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea/copyright Add copyright profile and update copyright notice in project files. Dec 3, 2019
binder add README.txt, CHANGELOG.md Dec 13, 2019
demo inline plotFactory in resizable demo Jan 10, 2020
docs add quickstart notebook and image Dec 13, 2019
frontend-api Refactor frontend context. Jan 8, 2020
gradle/wrapper Add copyright profile and update copyright notice in project files. Dec 3, 2019
plot-api Add GGbunch and demo, but need to fix MonolithicAWT Jan 9, 2020
.gitignore Add copyright profile and update copyright notice in project files. Dec 3, 2019
CHANGELOG.md
LICENSE rename api package to `letsPlot`, update links to new js (1.0.0rc1) Nov 26, 2019
README.md
build.gradle Kotlin 1.3.61 Dec 11, 2019
build_settings.template.yml
gradle.properties Switch to 1.1.1-SNAPSHOT and simplify demo util. Dec 19, 2019
gradlew Switch to gradle multiproject Jun 12, 2019
gradlew.bat Switch to gradle multiproject Jun 12, 2019
settings.gradle Add copyright profile and update copyright notice in project files. Dec 3, 2019

README.md

Lets-Plot for Kotlin

Couldn't load MIT license svg

Overview

Lets-Plot for Kotlin is a Kotlin API for Lets-Plot library - an open-source plotting library for statistical data which is written entirely in the Kotlin programming language.

Here you can find a documentation with examples in form of Jupyter notebook using Kotlin kernel.

Lets-Plot Kotlin API was built on the principals of layered graphics first described in the Leland Wilkinson work The Grammar of Graphics and later implemented in the ggplot2 package for R.

Lets-Plot in Jupyter with Kotlin Kernel

Installation

Install Kotlin Kernel and OpenJdk in Conda environment:

conda install kotlin-jupyter-kernel -c jetbrains

Quickstart in Jupyter

In Jupyter create new notebook, choose kernel - kotlin.

To evaluate the plotting capabilities of Lets-Plot, add the following code to a Jupyter notebook:

%use lets-plot
val rand = java.util.Random()
val data = mapOf<String, Any>(
    "rating" to List(200) { rand.nextGaussian() } + List(200) { rand.nextGaussian() * 1.5 + 1.5 },
    "cond" to List(200) { "A" } + List(200) { "B" }
)

var p = lets_plot(data)
p += geom_density(color="dark_green", alpha=.3) {x="rating"; fill="cond"}
p + ggsize(500, 250)

Couldn't load quickstart.png



Resources

License

Code and documentation released under the MIT license. Copyright 2019, JetBrains s.r.o.

You can’t perform that action at this time.