sp_ggplot_add_vline_hline: Add hline or vline for ggplot2 object

View source: R/utilities.R

sp_ggplot_add_vline_hlineR Documentation

Add hline or vline for ggplot2 object

Description

Add hline or vline for ggplot2 object

Usage

sp_ggplot_add_vline_hline(
  p,
  custom_vline_x_position = NULL,
  custom_vline_anno = NULL,
  custom_vline_anno_y_pos = NULL,
  custom_hline_y_position = NULL,
  custom_hline_anno = NULL,
  custom_hline_anno_x_pos = NULL,
  linetype = "dotted",
  size = 0.5,
  ...
)

Arguments

p

A ggplot2 object

custom_vline_x_position

A vector of coordinates for vertical lines.

custom_vline_anno

Annotation text for each vertical line.

custom_hline_y_position

A vector of coordinates for horizontal lines.

custom_hline_anno

Annotation text for each horizontal line.

...

Extra parameters given to geom_vline and geom_hline

Value

A ggplot2 object

Examples


## Not run:
sp_ggplot_add_vline_hline(p)

## End(Not run)



Tong-Chen/ImageGP documentation built on April 14, 2025, 12:54 p.m.