I am trying to create a 2D vector plot with variable colors (and line width) in gnuplot (version 4.4). I looked at examples for points:
splot "vectors.dat" u 1:2:3:4:(rgb($5,$6,$7)) w points pt 7 pointsize var linecolor rgb variable
where rgb is a function that converts color to the friendly gnuplot format.
Modifying to vectors seemed simple, but I came across several problems. My sample code (for variable coloring):
splot "vectors.dat" u 1:2:(rgb($5,$6,$7)):3:4:(rgb($5,$6,$7)) with vectors head filled size screen 0.05,15,45 linetype 1 linewidth 2 linecolor rgb variable
I also tried putting 0 in the third column, since the designation of the vector is gnuplots (x, y, z) (dx, dy, dz). In addition, I also tried to swap columns and use random values. But no matter what I do, the arrows remain black.
Is there something obvious that I'm missing?
Thanks in advance,
Arash
Arash source
share