4
votes

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?

2
Works here without problems. Any further hints (OS, gnuplot version...)? - vaettchen
Operating system is OSX Mavericks. Gnuplot is 4.6.3 I believe. I find it very odd. It must be something to do with how the file is formatted I guess but I just can't see what the problem could be. - crevell
You might try opening the data file in a program that displays special character/endline information to see if there is anything weird. TextWrangler can display that info (View > Text Display > Show Invisibles). - andyras
Different kinds of whitespaces shouldn't be a problem. Make sure, that you don't have any odd settings. Try only reset; plot "filename". - Christoph
reset command has no effect unfortunately. Showing invisibles in the text file gives small triangles between data points. Presumably these are tabs? - crevell

2 Answers

3
votes

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.

0
votes

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.