import numpy as np
from lets_plot import *Let’s Plot
Quarto example for the 2023-07-24 edition of hrbrmstr’s Daily Drop.
LetsPlot.setup_html()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')
) + \
ggsize(700, 300) + \
geom_density(
color = 'dark_green',
alpha = .7
) + \
scale_fill_brewer(
type='seq'
) + \
theme(
panel_grid_major_x = 'blank'
)