#cetz.chart({
plot.add(label: $n'_min$, ...)
plot.add(label: $n'_max$, ...)
for value in values {
plot.add(style: palette.purple, label: if value.t == 1 { $n$ })
}
})
This is obviously simplified, but it should across what kind of structure the data has that I'm visualizing.
I would like to add an entry to the legend which more clearly communicates that n is every line in the purple palette, without actually adding 7 different lines.
Currently, there doesn't seem to be a way to easily add some entry to the legend of a plot manually, or for a group of elements in the plot. Ideally, I would manually add an item to the plot at the end, such that it renders a gradient of the palette. Alternatively, I could somehow tell the plot that they all share a label, and it would figure it out from their chosen colors.
I have a plot like so:![image](https://github.com/cetz-package/cetz-plot/assets/137803093/e108dca4-e428-4a06-8b96-f5d2520a3d43)
Which is constructed sort of like this:
This is obviously simplified, but it should across what kind of structure the data has that I'm visualizing.
I would like to add an entry to the legend which more clearly communicates that
n
is every line in the purple palette, without actually adding 7 different lines.Currently, there doesn't seem to be a way to easily add some entry to the legend of a plot manually, or for a group of elements in the plot. Ideally, I would manually add an item to the plot at the end, such that it renders a gradient of the palette. Alternatively, I could somehow tell the plot that they all share a label, and it would figure it out from their chosen colors.