This function takes a matrix generated using transform and write it into an ASCII or binary file. It returns a matrix with the exact format of the saved file. And if dir is specified as "no", no file will be saved. For more detailed inctructions, please refer to the documentation.
Example
In Octave, the saved file will be saved under the current directory:
x = (-10:1:10)';
y = x';
z = x*y;
w = sin(x)*sin(y);
zz = transform (x, y, z, w);
rt = gsave (zz, 4, 1, "save");
The output is the saved data file "save". The function gsave must be used with transform. Before using the function gsave, one must use the function transform to put x, y, and z matrices together into one matrix. And after doing so, gsave should be used to save the data into a file in the Gnuplot data file format.