c_legend_label: Legend Label

Description Usage Arguments Examples

View source: R/legend.R

Description

Customise the legend labels.

Usage

1
2
3
4
5
6
7
8
9
c_legend_label(
  c,
  box_width = 40,
  font_size = 12,
  font_style = "normal",
  font_family = helvetica(),
  padding = 10,
  use_point_style = FALSE
)

Arguments

c

An object of class charter as returned by c_hart.

box_width

Width of colored box in pixels.

font_size

Font size of text in pixels.

font_style

Font style.

font_family

Font family to use.

padding

Padding, in pixels, between rows of boxes.

use_point_style

Label style will match corresponding point style (size is based on the mimimum value between boxWidth and fontSize).

Examples

1
2
3
4
c_hart(cars, caes(speed, dist)) %>% 
 c_line() %>% 
 c_legend(position = "bottom") %>% 
 c_legend_label(box_width = 100)

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