int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
An example of using these routines is provided in the file bf_test.c, which generates binary files for the demo file demo/binary.dem.
Usage in plot:
plot `a.dat` matrix plot `a.dat` matrix using 1:3 plot 'a.gpbin' {matrix} binary using 1:3will plot rows of the matrix, while using 2:3 will plot matrix columns, and using 1:2 the point coordinates (rather useless). Applying the every option you can specify explicit rows and columns.
Example – rescale axes of a matrix in a text file:
splot `a.dat` matrix using (1+$1):(1+$2*10):3
Example – plot the 3rd row of a matrix in a text file:
plot 'a.dat' matrix using 1:3 every 1:999:1:2(rows are enumerated from 0, thus 2 instead of 3).
Gnuplot can read matrix binary files by use of the option binary appearing
without keyword qualifications unique to general binary, i.e., array,
record, format, or filetype. Other general binary keywords for
translation should also apply to matrix binary. (See binary general (p. ) for
more details.)