|
From: theozh <th...@gm...> - 2026-04-01 08:48:39
|
in case this is still of interest...
If the values in the 4th column are numbers, you could pick the RGB-value from a string.
Check for example `help linecolor variable` and `help word`
Hope this helps, Theo.
### point color depending on column value
reset session
$Data <<EOD
1 4 foo 1
2 3 bar 3
5 8 baz 2
EOD
set key noautotitle
myLabel(col) = sprintf("%s", strcol(col))
myColor(col) = int(word("0xff0000 0x00ff00 0x0000ff", int(column(col))))
plot $Data u 1:2:(myLabel(3)):(myColor(4)) w labels hypertext point pt 7 lc rgb var
### end of script
|