plot matrix missing points in different color using gnuplot
- by kitt
I have a file 'matrix.dat':
1 2 3 4 5
5 - 3 4 5
- 4 5 B -
1 B 2 B 3
- 3 2 - 3
I want to plot numbers using palette, '-' using white color and 'B' using black color.
In gnuplot, I use this palette (blue - cyan - green - orange - red):
set palette model HSV functions 0.666*(1-gray), 1, 1
And set '-' as missing data:
set datafile missing "-"
plot 'matrix.dat' matrix with image
Now I can only plot numbers and '-' in correct colors.