Reputation: 460
This might seem trivial, but I used Excel to manipulate some data from my program, then output the data in tsv format. I want to plot it with gnuplot, with no more complexity than plot "filename"
, but gnuplot produces an empty graph and flashes up warnings about empty xrange
and empty yrange
. The data is copied below. Can anyone see what might be wrong with it?
Thanks very much
0.0000 0.0
360.002716 0.04424679
1260.00952 -0.053663898
2160.00659 0.118732237
3060.00342 0.109153613
3960.00049 -0.002001554
4860.00732 0.281198434
5760.00439 0.359723032
6660.00098 0.559242511
Update: weirdly, if I copy the data above from this web page into the data file, overwriting the data that was already there, gnuplot will plot it fine. This seems very odd that the data above was copied from the file in the first place. Presumably there must be some formatting lost or changed in the copying and pasting?
Upvotes: 4
Views: 8249
Reputation: 1369
Answer is a few months late but I had the same problem.
My problem was gnuplot expected CRLF to end the line but it only had CR which threw it off.
Open the file in Notepad and see if it shows everything in one line. Notepad doesn't recognize just CR as a line break.
Upvotes: 3
Reputation: 15910
If you output tsv, I suspect gnuplot is having trouble detecting the field separator (although in my experience this isn't an issue under *nix). You can manually set the separator with the command
set datafile separator "\t"
Otherwise your data file looks fine.
Upvotes: 0