gnuplot or scilab
Below is a script for SciLab that I wrote awhile back. It reads in three columns separated by tabs. You can easily change this to fit your needs, pretty self-explanatory. Here is a quick guide to reading/writing in scilab and the one I reference below is here:
function plot_from_file(datafile)
//
// Make a simple x-y-z plot based on values read from a datafile.
// We assume that the datafile has three columns of floating-point
// values seperated by tabs.
// set verbose = 1 to see lots of diagnostics
verbose = 1;
// open the datafile (quit if we can't)
fid = mopen(datafile, 'r');
if (fid == -1)
error('cannot open datafile');
end
// loop over all lines in the file, reading them one at a time
num_lines = 0;
while (true)
// try to read the line ...
[num_read, val(1), val(2), val(3)] = mfscanf(fid, "%f\t%f\t%f");
if (num_read <= 0)
break
end
if (verbose > 0)
fprintf(1, 'num_lines %3d num_read %4d \n', num_lines, num_read);
end
if (num_read ~= 3)
error('didn''t read three points');
end
// okay, that line contained valid data. Store in arrays
num_lines = num_lines + 1;
x_array(num_lines) = val(1);
y_array(num_lines) = val(2);
z_array(num_lines) = val(3);
end
// now, make the plot
plot3d2(x_array, y_array, z_array);
// close the datafile
mclose(fid);
endfunction