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.
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
	 yintercept=[2.5, 4.0], Geom.point,
	 Geom.hline(color=colorant"orange", size=2mm))
SepalLength 4 5 6 7 8 2.0 2.5 3.0 3.5 4.0 4.5 SepalWidth