hypo_coral_generic: Add a generic coral to a ggplot

View source: R/hypoimg_generic.R

hypo_coral_genericR Documentation

Add a generic coral to a ggplot

Description

hypo_coral_generic adds a generic coral with custom color.

Usage

hypo_coral_generic(
  col = "darkgray",
  x_in = 0.5,
  y_in = 0.5,
  width_in = 1,
  height_in = 1,
  coral_side = c("l", "r"),
  coral_type = c("branch", "table", "brain"),
  ...
)

Arguments

col

string (color, optional), defaul = darkgray

x_in

horizontal position

y_in

vertical position

width_in

numeric scalar (optional), width (in graph x axis units)

height_in

numeric scalar (optional), width (in graph y axis units)

coral_side

string scalar (optional), one of (l, r) - orientation of the coral

coral_type

string scalar (optional), one of (branch, table, brain) - coral type

...

catch all parameter to allow excess parameter through purrr::pmap

Details

This function allows the placement of a coral sketch within a ggplot. It is based on ggplot2::annotation_custom() and allows to specify the coloration of the coral.

See Also

hypo_hamlet_generic

Examples

ggplot()+
  hypo_coral_generic(col = clr2[[2]])+
  hypo_hamlet_generic(col = clr2[[1]], x = .6, y = .6,, width_in = .3)   +
  hypo_hamlet_generic(col = clr2[[1]], x = .4, y = .3,  face = 'r', width_in = .3)


k-hench/hypoimg documentation built on June 2, 2022, 1:49 a.m.