agg_rename_series: Rename series in your plot (for legends and autolabeller)

Description Usage Arguments Examples

View source: R/gg-constructors.R

Description

Rename series in your plot (for legends and autolabeller)

Usage

1
agg_rename_series(mapping = list(), panel = NULL)

Arguments

mapping

A list with values the existing series names and names the new series names

panel

(optional) Only apply mapping to specific panels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Simple example
arphitgg(data.frame(x=1:10,y=1:10), agg_aes(x,y)) + agg_line() +
  agg_rename_series(list('Nicer series name' = 'y')) +
  agg_legend()

# With groups
arphitgg(data.frame(x=1:10,y=1:10,g=c(rep("a",5),rep("b",5))),
         agg_aes(x,y,g)) +
  agg_line() +
  agg_rename_series(list('Group A' = 'a', "Group B" = "b")) +
  agg_legend()

angusmoore/arphit documentation built on Feb. 15, 2021, 9:40 a.m.