Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 794 Bytes

geom_hline.md

File metadata and controls

41 lines (30 loc) · 794 Bytes

title: hline author: Daniel Jones part: Geometry order: 1005 ...

Draw horizontal lines across the plot canvas.

Aesthetics

  • yintercept: Y-axis intercept

Arguments

  • color: Color of the lines.
  • size: Width of the lines.

Examples

using RDatasets
using Gadfly

Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
	 yintercept=[2.5, 4.0], Geom.point, Geom.hline)
# 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="orange", size=2mm))