Python Plotting Library Based on the Grammar of Graphics

JB Official Latest release MIT License

Python versions: 3.7-3.12

OS: Linux, macOS, Windows


pip install lets-plot


 1import numpy as np
 2from lets_plot import *
 6data = dict(
 7    cond=np.repeat(['A', 'B'], 200),
 8    rating=np.concatenate((np.random.normal(0, 1, 200), np.random.normal(1, 1.5, 200)))
11ggplot(data, aes(x='rating', fill='cond')) + ggsize(700, 300) + \
12    geom_density(color='dark_green', alpha=.7) + scale_fill_brewer(type='seq') + \
13    theme(panel_grid_major_x='blank')

Explore Your Data with Lets-Plot

Key Features


Grammar of Graphics

We recommend an excellent book called “ggplot2: Elegant Graphics for Data Analysis”. This will be a good prerequisite for further exploration of the Lets-Plot library.


Customizable Tooltips

You can customize the content, values formatting and appearance of tooltip for any geometry layer in your plot. Learn more.


Suitable for Scientist and Developer

Works in computational notebooks (Jupyter, Datalore, Kaggle, Colab, Deepnote) and in JetBrains professional IDEs - PyCharm.



Lets-Plot supports formatting of numeric and date-time values in tooltips, legends, on the axes and text geometry layer. Learn more.


Kotlin API

R, Python, what’s next? Right. Lets-Plot Kotlin API enables data visualization in JVM and Kotlin/JS applications as well as in scientific notebooks like Jupyter and Datalore.



Sampling is a special technique of data transformation, which helps to deal with large datasets and overplotting. Learn more.


Geospatial Visualization

Find spatial objects with the help of our powerful and easy to use Geocoding module. In case you already have GeoDataFrame on hand - plot it straight away.


Export to SVG, PDF, HTML and PNG

The ggsave() function is an easy way to export plot to a file in SVG, PDF, HTML or PNG formats. Learn more.


Interactive Maps

Interactive maps allow zooming and panning around your geospatial data with customizable vector or raster basemaps as a backdrop. Learn more.


‘No Javascript’ and Offline Mode

In the ‘no javascript’ mode Lets-Plot generates plots as bare-bones SVG images. Plots in the notebook with option offline=True will be working without an Internet connection. Learn more.