Plot Shape by Value

Untested:

  • Create a colormap with N colors Colormaps and Colorscales · Colors, pass it as color_palette to plot.
  • Determine extrema of your gradients.
  • Map gradient values to colormap indices 1:N something like grad -> round(Int, (grad-gradmin)/(gradmax-gradmin) * (N-1) + 1)
  • Get colormap index for each triangle’s gradient, pass as fillcolor or seriescolor to plot
2 Likes