powered by
scale_color_identity()
assign colors by a column in a tibble, for the convenience to use scale_color_identity()
assign_colors(df, by, colors = sci_colors("npg", 10), na = "#F5F5F5")
tibble
assign colors according to this column
a vector of color values
if colors are not enough, fill na values
assign_colors(mini_diamond, cut, colors = sci_colors("nejm", 8))
Run the code above in your browser using DataLab