I'm trying to create a heatmap with gnuplot. In input I have a matrix with N rows and M columns but the axis should be always label with numbers going from 0 to 1. I'm not exactly sure about the best way to count the lines and rows of my input matrix.
To show you some code:
set term png
set out "test.png"
set pm3d map
set size ratio 1
set pm3d interpolate 0,0
set tics out nomirror
splot 'test.dat' matrix using ($1/N):($2/M):3 notitle
set out
How can I calculate M and N in this script?