{"id":15017764,"url":"https://github.com/jetbrains/lets-plot-kotlin","last_synced_at":"2025-05-15T07:07:37.687Z","repository":{"id":37077517,"uuid":"172682391","full_name":"JetBrains/lets-plot-kotlin","owner":"JetBrains","description":"Grammar of Graphics for Kotlin","archived":false,"fork":false,"pushed_at":"2025-03-24T15:36:13.000Z","size":71533,"stargazers_count":462,"open_issues_count":17,"forks_count":38,"subscribers_count":220,"default_branch":"master","last_synced_at":"2025-05-15T07:07:30.793Z","etag":null,"topics":["charts","geotools","ggplot","ggplot2","graphics","jupyter","jupyter-notebooks","jvm","kotlin","kotlin-api","plot","plot-library","plots","plots-in-kotlin"],"latest_commit_sha":null,"homepage":"https://lets-plot.org/kotlin/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-26T09:42:50.000Z","updated_at":"2025-05-09T02:45:46.000Z","dependencies_parsed_at":"2023-12-25T16:48:37.898Z","dependency_job_id":"e86644c2-64b9-453c-959d-63cf95726853","html_url":"https://github.com/JetBrains/lets-plot-kotlin","commit_stats":{"total_commits":1003,"total_committers":17,"mean_commits":59.0,"dds":0.3200398803589233,"last_synced_commit":"f6edab1a67783d14e2378675f065ef7111bdc1a0"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Flets-plot-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Flets-plot-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Flets-plot-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Flets-plot-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains","download_url":"https://codeload.github.com/JetBrains/lets-plot-kotlin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292043,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charts","geotools","ggplot","ggplot2","graphics","jupyter","jupyter-notebooks","jvm","kotlin","kotlin-api","plot","plot-library","plots","plots-in-kotlin"],"created_at":"2024-09-24T19:50:57.837Z","updated_at":"2025-05-15T07:07:32.643Z","avatar_url":"https://github.com/JetBrains.png","language":"Kotlin","readme":"# Lets-Plot Kotlin API\nA **Grammar of Graphics** for Kotlin.\n\n[![official JetBrains project](http://jb.gg/badges/official-flat-square.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\n[![License MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/LICENSE)\n[![Latest Release](https://img.shields.io/github/v/release/JetBrains/lets-plot-kotlin)](https://github.com/JetBrains/lets-plot-kotlin/releases/latest)\n\n**Lets-Plot Kotlin API** is a \u003ca href=\"https://lets-plot.org/kotlin\"\u003eKotlin API\u003c/a\u003e for [Lets-Plot Multiplatform](https://github.com/JetBrains/lets-plot) \n plotting library, \\\nwhich is built on the principles of layered graphics first described in the \\\nLeland Wilkinson work [The Grammar of Graphics](https://www.goodreads.com/book/show/2549408.The_Grammar_of_Graphics).\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"https://ggplot2-book.org/index.html\" target=\"_blank\"\u003e \n               \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/images/ggplot2-elegant-graphics-for-data-analysis.jpeg\" \n                    width=\"150\" height=\"228\" alt=\"book cover\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003cp\u003eLets-Plot \u003ca href=\"https://lets-plot.org/kotlin\"\u003eKotlin API\u003c/a\u003e is largely based on the API\u003cbr\u003eprovided by \n            \u003ca href=\"https://ggplot2.tidyverse.org/\"\u003eggplot2\u003c/a\u003e package well-known to data scientists who use R.\u003c/p\u003e\n            \u003cp\u003eTo learn more about the \u003ci\u003eGrammar of Graphics\u003c/i\u003e,\u003cbr\u003ewe recommend an excellent book called\u003cbr\u003e \n            \u003ca href=\"https://ggplot2-book.org/index.html\" target=\"_blank\"\u003e“ggplot2: Elegant Graphics for Data Analysis”\u003c/a\u003e.\u003c/p\u003e \n            \u003cp\u003eThis will be a good prerequisite for further exploration of the Lets-Plot library.\u003c/p\u003e\n        \u003c/td\u003e  \n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003ca id=\"quickstart\"\u003e\u003c/a\u003e\n### Quickstart\n\nInside [Kotlin Notebook](https://plugins.jetbrains.com/plugin/16340-kotlin-notebook),\n[Datalore](https://datalore.jetbrains.com/) or\n[Jupyter with Kotlin Kernel](https://github.com/Kotlin/kotlin-jupyter#readme):\n\n```\n%use lets-plot\n```     \n\n```kotlin\nval rand = java.util.Random()\nval data = mapOf(\n    \"rating\" to List(200) { rand.nextGaussian() } + List(200) { rand.nextGaussian() * 1.5 + 1.5 },\n    \"cond\" to List(200) { \"A\" } + List(200) { \"B\" }\n)\n\nvar p = letsPlot(data)\np += geomDensity(color = \"dark_green\", alpha = .3) { x = \"rating\"; fill = \"cond\" }\np + ggsize(700, 350)\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/images/quickstart_notebook.png\" alt=\"Couldn't load quickstart_notebook.png\" width=\"523\" height=\"261\"/\u003e\n\u003cbr/\u003e\n\nSee the \"Quickstart\" notebook in [Datalore](https://datalore.jetbrains.com/view/notebook/aTA9lQnPkRwdCzT6uy95GZ) or\n[Jupyter nbviewer](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/quickstart.ipynb).\n\n\n\u003ca name=\"toc\" id=\"toc\"\u003e\u003c/a\u003e\n## Table of Contents\n             \n- [Usage](#usage)\n  - [Notebooks](#in-notebook)\n  - [Compose Multiplatform](#in-compose-multiplatform)\n  - [JVM and Kotlin/JS](#in-jvm-js)\n- [Documentation](#documentation)\n- [What is new in 4.10.0](#new)\n- [Recent Updates in the Gallery](#recent_gallery_updates)\n- [Change Log](#change_log)\n- [Code of Conduct](#CoC)\n- [License](#license)\n                          \n\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n\u003ca id=\"in-notebook\"\u003e\u003c/a\u003e\n### Notebooks\n\nWith the help of Lets-Plot Kotlin API you can easily create plots in [Kotlin Notebook](https://plugins.jetbrains.com/plugin/16340-kotlin-notebook),\n[Datalore](https://datalore.jetbrains.com/), [Jupyter with Kotlin Kernel](https://github.com/Kotlin/kotlin-jupyter#readme) \\\nor any other notebook that supports `Kotlin Kernel`.\n\n\n#### \"Line Magics\"\n\n```\n%use lets-plot\n```  \nThis \"line magic\" will apply **Lets-Plot library descriptor** which adds to your notebook all the boilerplate code necessary to create plots.\n\nBy default, `library descriptor` is bundled with the Kotlin Jupyter Kernel installed in your environment. \\\nHowever, you can override the default settings using:\n```\n%useLatestDescriptors\n```\nIn this case the latest `library descriptor` will be pulled from the [Kotlin Jupyter Libraries](https://github.com/Kotlin/kotlin-jupyter-libraries) repository.\n\n#### Library Descriptor Parameters\n\n```\n%use lets-plot(v=4.10.0, isolatedFrame=false)\n```                                                                 \n- `v` - version of the Lets-Plot Kotlin API.\n- `isolatedFrame` - If `false`: load JS just once per notebook (default in Jupyter).\n  If `true`: include Lets-Plot JS in each output (default in [Datalore](https://datalore.jetbrains.com/) notebooks).\n\n\n\u003ca id=\"in-compose-multiplatform\"\u003e\u003c/a\u003e\n### Compose Multiplatform\nTo learn how to embed Lets-Plot charts in [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform) applications, please check out the [Lets-Plot Skia Frontend](https://github.com/JetBrains/lets-plot-skia) project.\n   \n\n\u003ca id=\"in-jvm-js\"\u003e\u003c/a\u003e\n### JVM and Kotlin/JS\n\nTo learn more about creating plots in JVM or Kotlin/JS environment please read [USAGE_SWING_JFX_JS.md](https://github.com/JetBrains/lets-plot-kotlin/blob/master/USAGE_BATIK_JFX_JS.md). \n        \n#### Examples\nExamples of using of the Lets-Plot Kotlin API in JVM and Kotlin/JS applications are available in the [Lets-Plot Kotlin Mini Apps (Demos)](https://github.com/alshan/lets-plot-mini-apps) GitHub repository.\n\n\u003ca id=\"documentation\"\u003e\u003c/a\u003e\n## Documentation\n\n* _Lets-Plot Kotlin API_ documentation and API reference: [**Lets-Plot for Kotlin**](https://lets-plot.org/kotlin)\n\n* A quick introduction to the _Grammar of Graphics_ and _Lets-Plot Kotlin API_: [Lets-Plot Usage Guide](https://nbviewer.jupyter.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/guide/user_guide.ipynb) \n\n\n\u003ca id=\"new\"\u003e\u003c/a\u003e\n## What is new in 4.10.0\n\n- #### Markdown Support in *Title*, *Subtitle*, *Caption*, and Axis Labels\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/markdown.png\" alt=\"Markdown Support\" width=\"400\" height=\"237\"\u003e\n\n  See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/markdown.ipynb).\n\n- #### Support for Multiline Axis Labels, Text Justification in Axis Labels\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/multiline_axis_labels.png\" alt=\"Multiline Axis Labels\" width=\"400\" height=\"275\"\u003e\n\n  See examples: [multiline axis labels](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/multiline_axis_labels.ipynb),\n  [axis label justification](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/axis_label_justification.ipynb).\n\n- #### `geomHex()` Geometry\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/geom_hex.png\" alt=\"Geometry Hex\" width=\"370\" height=\"296\"\u003e\n\n  See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_hex.ipynb).\n\n- #### `ggbunch()` Function: Combining Plots with Custom Layout\n  It replaces the deprecated `GGBunch` class.  \u003cbr/\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/magnifier_inset.png\" alt=\"Magnifier Inset\" width=\"400\" height=\"251\"\u003e\n\n  See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/magnifier_inset.ipynb).\n\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/ggbunch_kotlin_isl.png\" alt=\"Map of Kotlin Isl.\" width=\"400\" height=\"254\"\u003e\n\n  See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/ggbunch_kotlin_isl.ipynb).\n\n- #### Parameters `start` and `direction` in `geom_pie()` Geometry\n  \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/geom_pie_params.png\" alt=\"Pie Params\" width=\"400\" height=\"119\"\u003e\n\n  See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_pie_params.ipynb).\n\n\n- #### And More\n\n  See [CHANGELOG.md](https://github.com/JetBrains/lets-plot-kotlin/blob/master/CHANGELOG.md) for a full list of changes.\n\n\n\u003ca id=\"recent_gallery_updates\"\u003e\u003c/a\u003e\n## Recent Updates in the [Gallery](https://lets-plot.org/kotlin/gallery.html)\n\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/magnifier_inset.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-magnifier_inset.png\" alt=\"Creating magnifier inset effect with ggbunch()\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/theme_legend_scheme.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-theme_legend_scheme.png\" alt=\"Customize legend appearance\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/interact_pan_zoom.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-interact_pan_zoom.png\" alt=\"Zoom and Pan interactivity\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/lp_verse.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-lp_verse.png\" alt=\"The observable LP-verse\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/sunshine_hours.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-sunshine_hours.png\" alt=\"Sunshine hours\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/us_unemployment.ipynb\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/Writerside/images/previews/square-us_unemployment.png\" alt=\"Unemployment in the US since 1967\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n\n\n\u003ca id=\"change_log\"\u003e\u003c/a\u003e\n## Change Log\n\nSee [CHANGELOG.md](https://github.com/JetBrains/lets-plot-kotlin/blob/master/CHANGELOG.md).\n\n\n\u003ca id=\"CoC\"\u003e\u003c/a\u003e\n## Code of Conduct\n\nThis project and the corresponding community are governed by the \n[JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct). \nPlease make sure you read it.\n\n\u003ca id=\"license\"\u003e\u003c/a\u003e\n## License\n\nCode and documentation released under\nthe [MIT license](https://github.com/JetBrains/lets-plot-kotlin/blob/master/LICENSE).\nCopyright © 2019-2025, JetBrains s.r.o.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Flets-plot-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetbrains%2Flets-plot-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Flets-plot-kotlin/lists"}