c_legend: Legend

Description Usage Arguments Examples

View source: R/legend.R

Description

Customise the legend.

Usage

1
2
3
4
5
6
7
8
9
c_legend(
  c,
  display = TRUE,
  position = c("top", "left", "bottom", "right"),
  align = c("center", "start", "end"),
  full_width = TRUE,
  reverse = FALSE,
  rtl = FALSE
)

Arguments

c

An object of class charter as returned by c_hart.

display

Whether to show the legend.

position

The position of the legend.

align

Alignment of the legend.

full_width

Marks that this box should take the full width of the canvas (pushing down other boxes).

reverse

Legend will show datasets in reverse order.

rtl

Renders legend from right to left.

Examples

1
2
3
c_hart(cars, caes(speed, dist)) %>% 
 c_line() %>% 
 c_legend(position = "left")

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