Learn R Programming

g2r (version 0.1.0)

legend: Legend

Description

Configure the chart's legend.

Usage

conf_legend(g2, var, ...)

leg(var, ...)

Arguments

g2

An object of class g2r as returned by g2r.

var

Bare column name of legend to apply changes to.

...

Configuration options or a logical indicating whether to show the legend.

Examples

Run this code
# NOT RUN {
g <- g2(cars, asp(speed, dist, color = dist)) %>% 
  fig_point()

g %>% conf_legend(dist, FALSE)

g %>% conf_legend(dist, position = "right")

# }

Run the code above in your browser using DataLab