title: GNUPLOT: logarithmic color box with plot & palette
body: <p>I am struggling with the following problem. I have a file with three columns, the <code>x-coord</code>, <code>y-coord</code> and <code>count</code>; think of it as of a sparse histogram, where a point is outputted only when <code>count &gt; 0</code>. </p>
  
  <p>I am trying to visualize it using <code>GNUPLOT</code> via</p>
  
  <pre><code>set palette defined (0 'white', 0.25 'blue', 0.5 'green', 0.75 'yellow', 1 'red')
  plot 'file' w p pt 7 palette t ''
  </code></pre>
  
  <p>which works just fine. Now, I would like to have a logarithmic color box, that is so that the colors are mapped to <code>log(count)</code>. I could trick it through <code>u 1:2:(log($3))</code>, but the scale on the color box would be off.</p>
  
  <p>Using <code>set log cb</code> actually gives me an error: <code>GNUPLOT</code> complains that the data is negative, which it is not, I have hand-checked the offending file. This is the error I get from a cut-down version of the file,</p>
  
  <pre><code>gnuplot&gt; set logscale cb
  gnuplot&gt; plot 'data.dat' w p pt 7 palette
  Warning: empty x range [-0.226728:-0.226728], adjusting to [-0.228995:-0.22446]
           color axis has cb coord of -3.20125; must be above 0 for log scale!
  </code></pre>
  
  <p>The data file is actually very small:</p>
  
  <pre><code>-2.2672752051521861e-01 -9.0322580645161288e-01  1.2583021897450098e-03
  -2.2672752051521861e-01 -8.3870967741935487e-01  1.2583021897450098e-02
  -2.2672752051521861e-01 -7.7419354838709675e-01  6.2915109487250492e-03
  -2.2672752051521861e-01 -7.0967741935483875e-01  1.0066417517960079e-02
  -2.2672752051521861e-01 -6.4516129032258063e-01  1.0066417517960079e-02
  -2.2672752051521861e-01 -5.8064516129032262e-01  3.7749065692350295e-03
  -2.2672752051521861e-01 -5.1612903225806450e-01  6.2915109487250492e-03
  -2.2672752051521861e-01 -4.5161290322580649e-01  2.5166043794900197e-03
  -2.2672752051521861e-01 -3.8709677419354838e-01  4.4040576641075340e-03
  -2.2672752051521861e-01 -3.2258064516129037e-01  2.5166043794900197e-03
  -2.2672752051521861e-01 -2.5806451612903225e-01  1.2583021897450098e-03
  -2.2672752051521861e-01 -1.9354838709677424e-01  3.1457554743625246e-03
  -2.2672752051521861e-01 -1.2903225806451613e-01  6.2915109487250492e-04
  -2.2672752051521861e-01 -6.4516129032258118e-02  1.2583021897450098e-03
  -2.2672752051521861e-01  0.0000000000000000e+00  4.4040576641075340e-03
  -2.2672752051521861e-01  6.4516129032258007e-02  1.2583021897450098e-03
  -2.2672752051521861e-01  1.2903225806451601e-01  1.8874532846175148e-03
  -2.2672752051521861e-01  1.9354838709677424e-01  3.1457554743625246e-03
  -2.2672752051521861e-01  3.2258064516129026e-01  1.2583021897450098e-03
  -2.2672752051521861e-01  3.8709677419354827e-01  2.5166043794900197e-03
  -2.2672752051521861e-01  4.5161290322580649e-01  3.7749065692350295e-03
  -2.2672752051521861e-01  5.1612903225806450e-01  5.6623598538525447e-03
  -2.2672752051521861e-01  5.8064516129032251e-01  6.2915109487250492e-03
  -2.2672752051521861e-01  6.4516129032258052e-01  6.9206620435975537e-03
  </code></pre>
  
  <p>What's wrong?</p>