Multiplatform plotting library based on the Grammar of Graphics

JetBrains JetBrains Last update: Feb 28, 2024

Lets-Plot

official JetBrains project License MIT Latest Release

Lets-Plot is a multiplatform plotting library based on the Grammar of Graphics.

The library' design is heavily influenced by Leland Wilkinson work The Grammar of Graphics describing the deep features that underlie all statistical graphics.

This grammar [...] is made up of a set of independent components that can be composed in many different ways. This makes [it] very powerful because you are not limited to a set of pre-specified graphics, but you can create new graphics that are precisely tailored for your problem.

Grammar of Graphics for Python Latest Release

A bridge between R (ggplot2) and Python data visualization.
To learn more see the documentation site at lets-plot.org.

Grammar of Graphics for Kotlin Latest Release

Notebooks

Create plots in Kotlin Notebook, Datalore, Jupyter with Kotlin Kernel
or any other notebook that supports Kotlin Kernel.
To learn more see the Lets-Plot Kotlin API project at GitHub.

Compose Multiplatform

Embed Lets-Plot charts in Compose Multiplatform applications.
To learn more see the Lets-Plot Skia Frontend project at GitHub.

JVM and Kotlin/JS

Embed Lets-Plot charts in JVM (Swing, JavaFX) and Kotlin/JS applications.
To learn more see the Lets-Plot Kotlin API project at GitHub.

"Lets-Plot in SciView" plugin

JetBrains Plugins JetBrains plugins

Scientific mode in PyCharm and in IntelliJ IDEA provides support for interactive scientific computing and data visualization.

Lets-Plot in SciView plugin adds support for interactive plotting to IntelliJ-based IDEs with the Scientific mode enabled.

Note: The Scientific mode is NOT available in communinty editions of JetBrains IDEs.

Also read:

What is new in 4.2.0

  • Support for "Categoricals"

    See: example notebook.

  • Superscript for Numbers in Scientific Notation

    Warning!

    Do NOT(!) use exponent_format='pow' if you are planning to export plot to a raster format (PNG,PDF).

    The CairoSVG library (which is under the hood of our ggsave() function) does not handle tspan element properly end breaks superscript notation when transforming SVG to PNG/PDF.

    More details: Kozea/CairoSVG#317


    f-23f/images/superscript.png

    See: example notebook.

  • Exporting Plot to a File-Like Object.

    Convenience methods: to_svg(), to_html(), to_png(), to_pdf()

    See: example notebook.

  • Sharing of X,Y-scale Limits Between Subplots in gggrid()

    See: example notebook.

  • geom_spoke()


    f-23f/images/geom_spoke.png

    See: example notebook.

  • High-contrast Tileset "BW" for geom_livemap()


    f-23f/images/tileset_BW.png

    See: example notebook.
    See advanced example: Spatial prediction of soil pollutants with multi-output Gaussian processes. Credits: Essi Parent (@essicolo).

  • Other New Features and Improvements

    • scale_x_log2(), scale_y_log2()
    • New variables computed by 'count' and 'count2d' statistics: '..sumprop..', '..sumpct..'. See: example notebook.
    • Support using dictionaries for breaks/labels/values customization in scale_xxx() functions. See: example notebook.
    • The lablim parameter in scale_xxx() functions. See: example notebook.
    • label_text parameter in theme() for annotation text settings. See: example notebook.
    • NumberFormat: new flag ~ to trim trailing zeros.

Change Log

See CHANGELOG.md for other changes and fixes.

Code of Conduct

This project and the corresponding community are governed by the JetBrains Open Source and Community Code of Conduct. Please make sure you read it.

License

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

Subscribe to our newsletter