draw_key_image() draws the legend key of image layers (i.e. geom_image()).
The type of the key is determined by the global option ggimage.keytype,
which supports "point" (the default when the option is unset), "rect",
"image" and "blank" (no key, the behaviour of image layers before the
key was implemented). An unsupported value falls back to "point" with a
warning.
draw_key_image(data, params, size)A grid grob
A single row data frame containing the scaled aesthetics to display in this key
A list of additional parameters supplied to the geom.
Width and height of key in mm
Image layers have no default colour, so colour can be missing (i.e. NULL)
or NA in data, for instance when only alpha is mapped. Such keys fall
back to "black", so that alpha stays visible in the legend.