aes mapping for the 'geom'. The first mapping should be the one for the legend,
while others maybe needed for the 'geom' (e.g., label for geom_text).
data
input data frame. If users want to mapping 'VALUE' to 'colour',
the input data should contains 'VALUE' and 'colour' (actual value, e.g., 'red' and 'blue') variable.
geom
a geom to plot the data for generating the legend and the geom will be plotted invisible.
p
a ggplot object. If NULL, the 'last_plot()' will be used.