gghl: Construct highlighted version of geom_*.

Description Usage Arguments Value Examples

Description

This function can highlight geom functions who have 'stat' as a parameter. For example, geom_point, geom_rect, are acceptable. However, geom_abline isn't. In addition, geom_smooth does not workds currently.

Usage

1
gghl(geom, LL = list(colour = NA))

Arguments

geom

geom_* functions (e.g., geom_point)

LL

aethentics for lowlights specified by list (e.g., list(colour = 'gray', alpha = '0.5'))

Value

function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ggplot2)
geom_point_hl2 <- gghl(geom_point)
d <- data.frame(x = 1:5, y = 1, hl = 1:5 == 3)
ggplot(
  d,
  aes(x, y, highlight = hl)
) +
  geom_point_hl2()
ggplot(
  d,
  aes(x, y, highlight = hl, color = hl)
) +
  gghl(geom_point)()

atusy/ggAtusy documentation built on June 6, 2019, 8:41 p.m.