The color index for impulses used to select the line style, whereas for labels line type is used. This behavior is still present in the current development version. According to the documentation, the behavior for labels correct. help linecolor variable says: " lc variable tells the program to use the value read from one input column as a line type index ... You can set the text color in the same way with tc variable ." Error, function or incorrect documentation?
As a workaround, you can use lc palette and an appropriately defined palette :
set style line 1 linetype 1 linewidth 2 pointtype 3 linecolor rgb "aquamarine" set style line 2 linetype 1 linewidth 2 pointtype 3 linecolor rgb "blue" set style line 3 linetype 1 linewidth 2 pointtype 3 linecolor rgb "coral" set palette defined (1 "aquamarine", 2 "blue", 3 "coral") unset colorbox set xrange [0:3] set yrange [0:3] # function to get style index for coloring: getCol(x) = (x==0)?1:((x==1)?2:3) unset key plot \ '-' using ($1+0.5):($2+0.5):(getCol($2)) with impulses lc variable, \ '' using ($1+0.5):($2+0.5):(stringcolumn(2)):(getCol($2)) with labels \ tc palette point ls 1 pt 7 lc palette offset 1,1 0 0 1 1 1.5 1 2 2 e 0 0 1 1 1.5 1 2 2 e
This gives the result: 
I hope the workaround works in your real case too. If for some reason you cannot override the palette, you can use lc rgb variable , in which case the last column should be an integer representation of the corresponding rgb color:
set style line 1 linetype 1 linewidth 2 pointtype 3 linecolor rgb "aquamarine" set style line 2 linetype 1 linewidth 2 pointtype 3 linecolor rgb "blue" set style line 3 linetype 1 linewidth 2 pointtype 3 linecolor rgb "coral" set xrange [0:3] set yrange [0:3] rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b) rgb1 = rgb(2, 215, 245)
You may only need tweek rgb values.
However, I will talk about this discussion on the gnuplot mailing list to see if this is really a bug or something else.
source share