Heatmap from Matrix with custom indices

Better us the GMT forum for continuing this (but can’t reply for the next couple hours).
The problem seems to be that the file has not what you think it has and hence GDAL complained with ERROR 4: "~/Desktop/sample.xyz" not recognized as a supported file format