Lets-plot Quickstart

pip install lets-plot
4.3s
import numpy as np
from lets_plot import *
LetsPlot.setup_html(isolated_frame=True)
0.0s

np.random.seed(12)
data = dict(
    cond=np.repeat(['A','B'], 200),
    rating=np.concatenate((np.random.normal(0, 1, 200), np.random.normal(1, 1.5, 200)))
)
(ggplot(data, aes(x='rating', fill='cond'))
  + geom_density(color='dark_green', alpha=.7) 
  + scale_fill_brewer(type='seq') + ggsize(800, 350))
0.6s
Runtimes (1)