Configure the chart's legend.

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

g <- g2(cars, asp(speed, dist, color = dist)) %>% fig_point() g %>% conf_legend(dist, FALSE) g %>% conf_legend(dist, position = "right")