Geom.hline

Draw horizontal lines across the plot canvas.

Aesthetics

Arguments

Examples

plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
   yintercept=[2.5, 4.0], Geom.point, Geom.hline)
SepalLength 4 5 6 7 8 2.0 2.5 3.0 3.5 4.0 4.5 SepalWidth
# Colors and widths of lines can be changed. This works separately from the
# `color` and `size` aesthetics.  They may be either a scalor or a vector of
# length(yintercept).
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
   yintercept=[2.5, 4.0], Geom.point,
   Geom.hline(color=["orange","red"], size=[2mm,3mm]))
SepalLength 4 5 6 7 8 2.0 2.5 3.0 3.5 4.0 4.5 SepalWidth