powered by
Gauge colour, similar to the scale_colour_* family of functions from the ggplot2 package.
scale_colour_*
ggplot2
gauge_color(g2, colors = NULL, callback = NULL)gauge_color_viridis(g2, option = c("viridis", "magma", "plasma", "inferno", "cividis"), reverse = FALSE, callback = NULL)
gauge_color_viridis(g2, option = c("viridis", "magma", "plasma", "inferno", "cividis"), reverse = FALSE, callback = NULL)
An object of class g2r as returned by g2r.
g2r
A vector of colors.
A JavaScript callback function (see cb) which returns a color.
cb
Palette name.
Whether to reverse the palette.
# NOT RUN { g2(mtcars, asp(mpg, qsec, color = drat)) %>% fig_point() %>% gauge_color(c("red", "white", "blue")) # }
Run the code above in your browser using DataLab