Re: coloring points based on column value when also using hypertext labels
theozh via gnuplot-info <[email protected]> Wed, 1 Apr 2026 10:48:25 +0200
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <[email protected]> |
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
_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info