Description Usage Arguments Examples
View source: R/gg-constructors.R
Rename series in your plot (for legends and autolabeller)
1 | agg_rename_series(mapping = list(), panel = NULL)
|
mapping |
A list with values the existing series names and names the new series names |
panel |
(optional) Only apply mapping to specific panels |
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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.