line: Draw Horizontal or Vertical Lines

hlineR Documentation

Draw Horizontal or Vertical Lines

Description

These functions are used to draw horizontal or vertical lines on an existing plot.

Usage

hline(x, lower, upper, label, at, ...)

vline(x, lower, upper, label, at, ...)

Arguments

x

A numeric vector.

lower

A vector which defines the line(s)' lower plot range.

upper

A vector which defines the line(s)' upper plot range.

label

Line label(s).

at

Numeric value(s) specifying where along the line the labels are to be displayed.

...

Arguments passed onto lines and text.

Functions

  • hline(): Draw horizontal lines.

  • vline(): Draw vertical lines.

Examples

  plot(c(0, 10), c(0, 10), type = "n")
  hline(0, col = "red", lty = "solid")
  vline(9, col = "red", lty = "dashed")
  vline(1:5, col = "black", lty = "solid", lwd = 2)

TobieSurette/gulf.graphics documentation built on Feb. 10, 2024, 10:58 p.m.