title: Filled contour plot with constant color between contour lines
body: <p>I have followed the example <a href="http://gnuplot-tricks.blogspot.com/2009/07/maps-contour-plots-with-labels.html" rel="noreferrer">here</a> for generating a filled contour plot using gnuplot. The gnuplot commands and output are:</p>
  
  <pre><code>reset
  f(x,y)=sin(1.3*x)*cos(.9*y)+cos(.8*x)*sin(1.9*y)+cos(y*.2*x)
  set xrange [-5:5]
  set yrange [-5:5]
  set isosample 250, 250
  set table 'test.dat'
  splot f(x,y)
  unset table
  
  set contour base
  set cntrparam level incremental -3, 0.5, 3
  unset surface
  set table 'cont.dat'
  splot f(x,y)
  unset table
  
  reset
  set xrange [-5:5]
  set yrange [-5:5]
  unset key
  set palette rgbformulae 33,13,10
  p 'test.dat' with image, 'cont.dat' w l lt -1 lw 1.5
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/PHE5l.png" alt="Filled contour plot generated using gnuplot."></p>
  
  <p>This method generates a very smooth filled contour plot. How can I modify this method so that the color between the contour lines is constant? For example, I would like for it to look similar to the output of this MATLAB script:</p>
  
  <pre><code>clc; clear all; close all;
  
  Nx = 250;
  Ny = 250;
  x = linspace(-5,5,Nx);
  y = linspace(-5,5,Ny);
  [X,Y] = meshgrid(x,y);
  
  f = sin(1.3*X).*cos(.9*Y) + cos(.8*X).*sin(1.9*Y) + cos(Y.*.2.*X);
  
  levels = -3:0.5:3;
  figure;
  contourf(X,Y,f,levels);
  colorbar;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/J5Jgu.png" alt="Filled contour plot generated using MATLAB."></p>