import numpy as np
from lets_plot import *
LetsPlot.setup_html()
ggplot() + \
geom_hline(yintercept=1,size=20, tooltips='none') + \
geom_point(x=0.5,y=1,
shape=21,size=10,stroke=10,fill="orange",color="green",
tooltips=layer_tooltips().line("size=^size, stroke=^stroke")) + \
geom_point(x=0.6,y=1,
shape=21,size=20,stroke=0,fill="orange",
tooltips=layer_tooltips().line("size=^size, stroke=^stroke")) + \
geom_point(x=0.7,y=1,
shape=21,size=0,stroke=20,color="green",
tooltips=layer_tooltips().line("size=^size, stroke=^stroke")) + \
theme_classic() + theme(axis='blank') + ggsize(600,200)
data = {
'x': (list(range(7)) * 4)[:26],
'y': ([3] * 7 + [2] * 7 + [1] * 7 + [0] * 7)[:26],
'shape': list(range(26)),
}
p = ggplot(data, aes('x', 'y')) + \
scale_shape_identity() + \
xlim(-0.5, 6.5) + \
ylim(-0.5, 3.5) + \
theme_classic() + theme(axis='blank')
p + \
geom_hline(aes(yintercept='yi'), data = {'yi': [0,1,2,3] }, color='light_gray', tooltips='none') + \
geom_point(aes(shape='shape'), color="black", fill="blue")
p + \
geom_hline(aes(yintercept='yi'), data = {'yi': [0,1,2,3] }, color='light_gray', tooltips='none', size=10) + \
geom_point(aes(shape='shape'), color="black", fill="pink", size=10, stroke=1)