title: Gnuplot: Variable colors (and linewidths) for 2D-Vector plot
body: <p>I am trying to create a 2D Vector-Plot with <strong>variable</strong> colors (and line-widths) in gnuplot (version 4.4) . I have looked at the examples for points:</p>
  
  <pre><code>splot "vectors.dat" u 1:2:3:4:(rgb($5,$6,$7)) w points pt 7 pointsize var linecolor rgb variable
  </code></pre>
  
  <p>where <em>rgb</em> is a function which translates the color to a gnuplot friendly format. </p>
  
  <p>A modification toward vectors seemed straightforward, but I stumbled over several problems. My example code is (for variable coloring):</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I have also tried to put 0 in the third column, since gnuplots notation of a vector is (x,y,z) (dx,dy,dz). Furthermore I have also tried to swap the columns, and used random values. But whatever I do, the arrows remain black.</p>
  
  <p>Is there something obvious I am missing?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Arash</p>