After playing a bit with gnuplot, I found another way of plotting the gradient filled rectangles if you have a file with data and that doesn't uses multiplot.
So if you have a file called data with data like this:
x_i y_i
at the i-th column, you can do this at gnuplot:
set view map
set palette
set pm3d explicit map
splot "data" using 1:2:(1) with lines lw 2 lc rgb "your_color", (x<x_min || x>max) || (y<y_min || y>y_max) ? 1/0 : x with pm3d
The important is the explicit option when setting pm3d: it colors with the palette colors when you give the with pm3d command. So you can color your data with your favorite color.
The third argument of using is just the z-value, and in this case is 1. The values x_min, x_max, y_min, y_max are the coordinates of the vertices of the rectangle.
As an example, I had a file like this
2*pi*i/500 sin(2*pi*/500)
where pi= 3.1415... With x_min=1, x_max=3, y_min=-0.7 and y_max=0.1, I obtained this graph:

Of course, this may be rather laborious in comparison with the method given by @andryas, because we have to write that long expression with the ternary operator, but for those unfamiliar with multiplot this works as well.
set pm3d map; splot x). - andyras