def get_system_color_plot(*, kind: str):
w, h = 400, 300
th, lh = 50, 75
width = w
height = h + th + lh
df = pd.read_csv("https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv")
title_color = 'pen' if kind == 'paper' else 'paper'
title_label_size = None if kind == 'paper' else 0
p_title = ggplot() + \
geom_label(x=0, label=kind, \
size=10, label_size=title_label_size, color=title_color, fill=kind, family='mono') + \
theme_void()
if kind == 'pen':
label = 'A hight-contrast color\ncommonly used to draw dots and lines'
p_example = ggplot(df, aes("cty", "hwy")) + geom_point()
elif kind == 'brush':
label = 'A color we often use to fill shapes'
p_example = ggplot(df, aes("fl")) + geom_bar()
elif kind == 'paper':
label = 'A "background" color\nwe often use to fill shapes as well'
p_example = ggplot(df, aes("drv", "cty")) + geom_boxplot()
p_label = ggplot() + \
geom_text(x=0, label=label, size=10) + \
theme_void()
return ggbunch(
[p_title, p_label, p_example],
[(0, 0, w / width, th / height),
(0, th / height, w / width, lh / height),
(0, (th + lh) / height, w / width, h / height)]
) + ggsize(width, height)