info: Text

Description Usage Arguments Details See Also Examples

Description

Add a point figure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
info_text(g, ..., style = NULL, data = NULL)

info_image(g, ..., style = NULL, data = NULL)

info_arc(g, ..., style = NULL, data = NULL)

info_line(g, ..., style = NULL, data = NULL)

info_vline(g, ..., style = NULL, data = NULL)

info_hline(g, ..., style = NULL, data = NULL)

info_abline(g, ..., style = NULL, data = NULL, direction = c(1, 2))

info_region(g, ..., style = NULL, data = NULL)

info_region_filter(g, ..., style = NULL, data = NULL)

info_marker(g, ..., style = NULL, data = NULL)

info_data_region(g, ..., style = NULL, data = NULL)

info_shape(g, ..., style = NULL, data = NULL)

info_html(g, ..., style = NULL, data = NULL)

Arguments

g

An object of class g2r as returned by g2().

...

Options to pass to the informational annotation.

style

A list of options defning the style.

data

A dataset to use with asp().

direction

Direction of diagonal line.

Details

info_vline, and info_hline use the x, and y asp() for placement.

See Also

Official annotation documentation for defails pon what to pass to ..., and asp().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
df <- head(cars, 5)

g2(cars, asp(speed, dist)) %>%
  fig_point() %>%
  info_text(
    position = c(20, 35),
    content = "Look here!"
  ) %>%
  info_text(
    asp(speed, dist),
    content = "Using aspects",
    data = df
  )

g2(cars, asp(speed, dist)) %>%
  fig_point() %>%
  info_vline(asp(x = 20)) %>%
  info_hline(asp(y = 20))

devOpifex/g2r documentation built on Jan. 16, 2022, 12:36 a.m.