Hey,
I found an unexpected behaviour change in Gnuplot v6.0.5 when combining colouring using a palette with setting a negative point interval (pi), see image attached, or shown using this minimal script:
set cbrange [0:3]
set sample 10
set pal viridis
plot for [i=0:1] "+" u ($1):($1+i*2):(i) w lp lc pal pt 7 lw 2 pi +1 t "Right colour: pi +1", \
for [i=2:3] "+" u ($1):($1+i*2):(i) w lp lc pal pt 7 lw 2 pi -1 t "Wrong colour: pi -1"
Changing pi to +1 sets the right colour in the key.
A work around is to set the colour not with "lc pal" but using "lc rgb palette(i)", but in this case the cb-range needs to be defined prior to the plot.
Cheers,
Alex