I have to create a color-map, and the plotting style "with image" does exactly what I want. (plot the exact value of z at the position x,y, so using pm3d is not an option for me)
The problem is, there are undefined points in my datafile. For example, the function represents a mass ratio and therefore negative z-values have no physical meaning and I want to omit them. Or some z-values are even "NaN".
Example Datafile:
1.0 1.0 1.5
1.0 2.0 1.7
1.0 3.0 1.9
2.0 1.0 1.6
2.0 2.0 1.8
2.0 3.0 2.0
3.0 1.0 1.7
3.0 2.0 1.9
3.0 3.0 -1.0
So I don't want to plot the value -1 at the position (3,3) but leave the pixel at (3,3) blank.
I tried this:
plot './test.dat' u 1:2:($3>0 ? $3 : 1/0) with image
but it doesn't work. It says:
warning: Number of pixels cannot be factored into integers matching grid. N = 8 K = 3
set datafile missing "NaN"
in the case that the -1.0 is replaced by "NaN" doesn't work either.
the only alternative I found is:
set pointsize 10
plot './test.dat' u 1:2:($3>0 ? $3 : 1/0) palette pt 5
but then I have to adjust the pointsize, x- and y-range and plot size for every plot manually, so that there are no spaces or overlapping of the datapoints. (See this question.)
So to cut a long story short: is there any way to use the "with image" plotting style with undefined/missing data points and leaving this points white?