Always reflect the current displayed color.

get_display_color(color, selected)

Arguments

color

the loon widget color

selected

the selected states

Value

The color shown on the plot

Details

In loon, each element (i.e. point, bin, line) has a "temporary" color and a "permanent" color. If one element is selected, the color is switched to the "temporary" color to highlight it. If the selection state is eliminated, the "permanent" color of this element will be displayed. Our function always gives the "temporary" displayed color.

Examples

if(interactive()) { p <- l_plot(1:10) p['selected'][c(1,3,5)] <- TRUE displayedColor <- get_display_color(p['color'], p['selected']) plot(1:10, bg = as_hex6color(displayedColor), pch = 21) }