Plot a discrete color legend for the discrete color scheme.

plot_discrete_legend(values, colors, title = "Values")

Arguments

values

Numeric or factor vector of values to map (same type as x).

colors

Character vector of hex color codes (same length as values and in the same order).

title

Title for the legend.

Value

A plot of the color legend.