Geom.hair

Geom.hair

Draws a line from the points to some intercept (base line). Looks like hairs standing on end, hence called a hair plot. Also known as a lollipop chart if the end points are plotted.

Aesthetics

Arguments

Examples

x= 1:10
s = [-1,-1,1,1,-1,-1,1,1,-1,-1]
pa = plot(x=x, y=x.^2, Geom.hair, Geom.point)
pb = plot(x=s.*(x.^2), y=x, Geom.hair(orientation=:horizontal), Geom.point, color=string.(s), Theme(key_position=:none))
hstack(pa, pb)
x -100 -50 0 50 100 0.0 2.5 5.0 7.5 10.0 y x 0.0 2.5 5.0 7.5 10.0 0 50 100 y