Derives the icon row/column positions from the unique combinations in
df, returning a plain data frame ready to rbind() with
group and symbol rows before passing to legend_canvas.
Arguments
- df
Data frame used in the ggplot call.
- icon
Column name holding icon names.
- label
Column name holding cell labels.
- row
Column whose unique values define grid rows.
- col
Column whose unique values define grid columns.
- label_fn
Optional function applied to label values before display.
- section
Value for the
sectioncolumn (default"grid").
Value
A data frame with columns section, type,
label, color, icon, row, col.
Rows are sorted by row then column (factor level order respected).
