cetz-plot
cetz-plot copied to clipboard
More powerful custom legend entries
Currently, add-legend only supports a custom preview function. It would be nice to be able to use the available marks more easily. I got around it by adding this manually, but it seems a bit verbose:
(
(
type: "legend-item",
label: name,
style: (stroke: none),
mark: mark,
mark-size: 0.2,
mark-style: (fill: black.lighten(75%), stroke: black),
axes: ("x", "y"),
data: (),
preview: auto,
),
)
So you want to be able to give all the styling keys you can give to add(...) to add-legend(...)?
That would be ideal, yes.