series: Serie

Description Usage Arguments Examples

Description

Add a series to chart.

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
c_line(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_scatter(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_bubble(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_bar(
  c,
  ...,
  label = NULL,
  inherit_caes = TRUE,
  data = NULL,
  orient = c("vertical", "horizontal")
)

c_radar(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_pie(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_doughnut(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_polar_area(c, ..., label = NULL, inherit_caes = TRUE, data = NULL)

c_boxplot(
  c,
  ...,
  label = NULL,
  inherit_caes = TRUE,
  data = NULL,
  orient = c("vertical", "horizontal")
)

c_violin(
  c,
  ...,
  label = NULL,
  inherit_caes = TRUE,
  data = NULL,
  orient = c("vertical", "horizontal")
)

c_error_bar(
  c,
  ...,
  label = NULL,
  inherit_caes = TRUE,
  data = NULL,
  type = NULL
)

Arguments

c

An object of class charter as returned by c_hart.

...

Any other options.

label

Label of the serie, if NULL then the serie is used.

inherit_caes

Whether to inherit caes from c_hart.

data

If NULL inherits data from c_hart.

orient

Orientation of box, violin, and plots.

type

Type of error bar to apply.

Examples

 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
chart(cars, caes(speed, dist)) %>% 
 c_line()

mtcars %>% 
 chart(caes(qsec, mpg, group = cyl)) %>% 
 c_scatter(color = "red")

mtcars %>% 
 chart(caes(qsec, mpg, group = cyl)) %>% 
 c_bubble(caes(size = drat)) %>% 
 c_color_scheme("brewer.Oranges3")

chart(mtcars, caes(y = qsec, group = cyl)) %>% 
 c_violin() %>% 
 c_colors()

df <- data.frame(
 x = factor(c(1, 2)),
 y = c(1, 5),
 upper = c(1.1, 5.3),
 lower = c(0.8, 4.3)
)

chart(df, caes(x, y, xmin = lower, ymax = upper)) %>% 
 c_error_bar(type = "bar")

JohnCoene/charter documentation built on Feb. 20, 2022, 11:07 p.m.