@diodelass ROOT would support this. Eg, one might save a TGraph. The result is effectively a gzipped binary list of (x,y,value) tuples. ROOT's a big software dependency to take on. If you are working in Python then "uproot" is a smaller, compatible package. Big caveat that ROOT's format popularity is fairly minimal outside particle/nuclear physics world.