plot matrix missing points in different color using gnuplot

Posted by kitt on Stack Overflow See other posts from Stack Overflow or by kitt
Published on 2013-07-02T17:02:52Z Indexed on 2013/07/02 17:05 UTC
Read the original article Hit count: 261

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about matrix

Related posts about gnuplot