|
From: Allin C. <cot...@wf...> - 2020-06-13 21:19:47
|
On Sat, 13 Jun 2020, Ethan Merritt wrote: > On Saturday, 13 June 2020 12:07:02 PDT Ethan A Merritt wrote: >> On Saturday, 13 June 2020 11:25:46 PDT Allin Cottrell wrote: >>> The following doesn't work (not surprising) but I'm wondering if >>> there's any real gnuplot syntax that'll do what it's trying to do: >>> >>> plot for [i=0:*] 'polygons.dat' index i with filledcurves \ >>> fc ($3 < 0 ? 'gray' : palette) >>> >>> The datafile contains several datasets representing polygons; the >>> first 2 columns hold the coordinates of vertices and the third a >>> value to be colorized (if >= 0) or shown as missing (gray) if >>> negative. >> >> Define the palette such that cb=0 is gray, the rest whatever you want. >> >> set palette defined (-0.001 "gray", 0 "first palette color", ..., 1 "last palette color") >> set cbrange [0:*] > > Ah, sorry. I missed the normal color for ( >= 0) requirement. > set cbrange [-0.001:*] Thanks, Ethan. I'd actually tried "set palette defined" plus "set cbrange" but I failed to get it right. Allin |