An Open-source Plotting Library for Statistical Data¶
Python versions: 3.6-3.10
OS: Linux, macOS, Windows
Installation¶
pip install lets-plot
Prerequisites¶
Windows users only: MinGW toolchain
Datalore¶
You can try Lets-Plot in Datalore where it is available out-of-the-box.
Quickstart¶
1import numpy as np
2from lets_plot import *
3LetsPlot.setup_html()
4
5np.random.seed(12)
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)))
9)
10
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')