l1 d1 Data#

Every layer may have some data associated with it. The “data” refers to a table of data where each row contains an observation and each column represents a variable that describes some property of each observation.

Data in this format is sometimes referred to as tidy data, flat data, primary data, atomic data, and unit record data.

You can pass tidy data to Lets-Plot in form of a Pandas Dataframe, a Polars Dataframe or just a dictionary: example notebook.

l2 d2 Basic Building Blocks#

Points: points, jittered points

Lines: line, path, diagonal line, horizontal line, vertical line, segment, curve, spoke, step-function

Areas: area, ribbon

Polygons: polygon, map

Tiles: tiles, rectangles, raster plot

Text: text, label


l3 d3 Discrete#

bar, pie, lollipop, boxplot, count/sum


l4 d4 Ordering Categories, as_discrete()#


Learn more: Function as_discrete().


l5 d5 Contours#

contours, filled contours


l6 d6 Visualization of Distribution#

histogram, density, dotplot, ydotplot, violin, ridgeline, frequency polygon


l7 d7 Stats#

stat_ecdf(), stat_summary(), stat_summary_bin()


l8 d8 Function#



l9 d9 Marginal Plots#


See also: Joint Plot, Residual Plot.


l10 d10 Visualization of Errors#

crossbar, errorbar, linerange, pointrange


l11 d11 Smoothing#

smoothing line


l12 d12 Bivariate Distribution#

2d bins, 2d density, filled 2d density


l13 d13 Time Series#

scale_x_datetime(), scale_y_datetime(), scale_x_time(), scale_y_time()


l14 d14 Images#

geom_imshow(), matrix of images


l15 d15 Facets#

facet_grid(), facet_wrap()


l16 d16 Coordinate Systems#

coord_cartesian(), coord_fixed(), coord_polar(), coord_flip(), coord_map()


l17 d17 ‘bistro’ Plots#

Exploratory Data Analysis (EDA) is an open-ended, highly interactive, iterative process, whose actual steps are segments of a stubbily branching, tree-like pattern of possible actions.

Learn more about instruments for EDA in Lets-Plot: ‘bistro’ Plots.

l18 d18 GeoPandas Shapes#

GeoPandas GeoDataFrame is supported by the following geometry layers: polygon, map, point, pie, text, path, rect.

Learn more: GeoPandas Support.


l19 d19 Grouping Plots#

GGBunch and gggrid shows a collection of plots on one figure.


l20 d20 Presentation Options#

theme(), ggtitle(), ggsize(), xlab(), ylab(), labs(), guide_legend(), guide_colorbar(), guides()

Predefined themes:

minimal2, bw, grey, classic, light, minimal, void, none

All predefined themes
All predefined themes
All predefined themes
All predefined themes
All predefined themes
All predefined themes

Color schemes (flavors):

darcula, solarized light, solarized dark, high contrast light, high contrast dark

Theme colors for geometries





Coding for Economists by Arthur Turrell


Python4DS by Arthur Turrell

  • Data Visualisation - will teach you how to visualise your data using using Lets-Plot.

  • Layers - a deeper dive into aesthetic mappings, geometric objects, and facets.

  • Exploratory Data Analysis - search for answers by visualising, transforming, and modelling your data.

Key Features#


Inspired by ggplot2

A faithful port of R’s ggplot2 to Python.

You can learn R’s ggplot2 and the grammar of graphics in the “ggplot2: Elegant Graphics for Data Analysis” book by Hadley Wickham.



A Grammar of Graphics for Python - works in Python notebooks (Jupyter, Datalore, Kaggle, Colab, Deepnote, Nextjournal) as well as in PyCharm and Intellij IDEA IDEs.

A Grammar of Graphics for Kotlin - a Kotlin multiplatform visualization library which fulfills your needs in the Kotlin ecosystem: from Kotlin notebooks to Compose-Multiplatform apps.


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.


Interactive Maps

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


Customizable Tooltips and Annotations

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



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


Export to SVG, HTML, PNG and PDF

Use the ggsave() function to save your plot to a file. Alternatively, leverage the to_svg(), to_html(), to_png(), or to_pdf() methods of the plot object to save it to a file or an in-memory file-like object. Learn more.

../../_images/show-ext-light.png ../../_images/show-ext-dark.png

Option to Display Plots in External Browser

With the “show externally” mode enabled, you can easily display a plot in an external browser by invoking its show() method. Learn more.



Sampling is a special technique of data transformation, which helps to deal with large datasets and overplotting. 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.