scale_color_viridis(..., alpha = 1, begin = 0, end = 1,
discrete = FALSE, option = "D", direction = 1)
scale_fill_viridis(..., alpha = 1, begin = 0, end = 1, discrete = FALSE,
option = "D", direction = 1)
Arguments
...
parameters to discrete_scale or scale_fill_gradientn
alpha
pass through parameter to viridis
begin
The (corrected) hue in [0,1] at which the viridis colormap begins.
end
The (corrected) hue in [0,1] at which the viridis colormap ends.
discrete
generate a discrete palette? (default: FALSE - generate continuous palette)
option
A character string indicating the colormap option to use. Four
options are available: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"),
and "viridis" (or "D", the default option).
direction
Sets the order of colors in the scale. If 1, the default, colors
are as output by viridis_pal. If -1, the order of colors is reversed.
Details
For discrete == FALSE (the default) all other arguments are as to
scale_fill_gradientn or scale_color_gradientn.
Otherwise the function will return a discrete_scale with the plot-computed
number of colors.
See viridis for more information on the color scale.