plot
plot copied to clipboard
ordinal opacity
Fixes #2284.
Hmm, this still crashes if you try to have a threshold opacity scale, which is a separate but related bug:
Plot.cellX(d3.range(10), {fill: "red", opacity: Plot.identity}).plot({opacity: {type: "threshold", legend: true, domain: [1, 2, 3], range: [0.2, 0.4, 0.6, 0.8]}})
But also it crashes if you try to display an ordinal opacity scale with a ramp legend, which should be supported (because we can display ordinal color scales with a ramp legend, too):
Plot.cellX(d3.range(10), {fill: "red", opacity: Plot.identity}).plot({opacity: {type: "ordinal", legend: "ramp"}})