Gnuplot gives a warning: skip data file without valid points

I am using gnuplot script

#qe.conf set terminal png truecolor set output "qe.png" set xrange ["400" : "700"] set yrange ["0" : "1"] set style data lines plot "qe.txt" using 1:2 title "%Red", '' using 1:3 title "%Gr", '' using 1:4 title "%Gb", '' using 1:5 title "%R" 

I execute gnuplot script qe.conf through a shell script. This gives me the following error:

gnuplot> plot "qe.txt" using a 1: 2 header "% Red", '' using a 1: 3 header "% Gr", '' using a 1: 4 header "% Gb", '' using 1 : 5 name "% R" ^ line 0: warning: skip data file without valid points

gnuplot> plot "qe.txt" using a 1: 2 header "% Red", '' using a 1: 3 header "% Gr", '' using a 1: 4 header "% Gb", '' using a header 1: 5 "% R" ^ line 0: warning: skip data file without valid points

gnuplot> plot "qe.txt" using a 1: 2 header "% Red", '' using a 1: 3 header "% Gr", '' using a 1: 4 header "% Gb", '' using a header 1: 5 "% R" ^ line 0: warning: skip data file without valid points

gnuplot> plot "qe.txt" using a 1: 2 header "% Red", '' using a 1: 3 header "% Gr", '' using a 1: 4 header "% Gb", '' using a header 1: 5 "% R" ^ line 0: warning: skip data file without valid points

But when I execute qe.conf manually, I work fine

The data file is here.

 400.0 0.3625060772 410.0 0.445987595886 420.0 0.503862994331 430.0 0.534251869841 440.0 0.576047041939 450.0 0.594211326218 460.0 0.58079588866 470.0 0.506666961836 480.0 0.495652452097 490.0 0.426107864611 500.0 0.342632041157 510.0 0.251232093174 520.0 0.178015786221 530.0 0.140803848655 540.0 0.120063881639 550.0 0.0995420648319 560.0 0.080193952073 570.0 0.0730989150532 580.0 0.0708069989426 590.0 0.0688014659014 600.0 0.0597099385221 610.0 0.0481330987744 620.0 0.042010859344 630.0 0.0425115579982 640.0 0.0460125024438 650.0 0.0515227545961 660.0 0.0559745367996 670.0 0.0629981328342 680.0 0.0573046109671 690.0 0.0688715871636 700.0 0.0742304568215 

`

Can anyone suggest a solution?

Hi everyone, After several hours of trying, I still have no answer. I tried the following. I tried to provide absolute paths for the data file, gnuscript and shell script. The gnuplot qe.conf command works fine if launched from the linux command line, but this error appears when launched through the shell script.

line 10: warning: skip data file without valid points

Request for help.

+5
source share
4 answers

I get this error every time I try to build a .csv file (comma), I forget that sometimes gnuplot needs to be reminded of what a separator is. Usually I get the same error that you mention, sometimes I do not get errors, but in any case, the data is not displayed until the delimiter is correctly defined.

gnuplot by default has spaces as a delimiter, but you might have redefined it and set it to a comma or something like that. Try telling gnuplot that your separator is.

set datafile separator " "

or

set datafile separator whitespace

and then, of course, for the comma try "," , and tab will try "\t"

I find it best to put set datafile separator " " at the top of my scripts to remind myself.

+4
source

You can also try checking the encoding in the data file.

I just ran into this exact problem while trying to build a data file. And it turned out that Gnuplot could not understand the data file because of its encoding (which was UTF-16LE).

When I changed the file encoding to UTF-8 , Gnuplot was able to read it without problems.

Since this post is already a little old, you probably already managed to solve it. Although I just thought it might help someone else who also gets this problem.

+2
source

The problem is that you are trying to build the 3rd, 4th and 5th columns of a set of two columns. If you change the plot command to abandon anything that uses 1: 3 or higher, it should work fine. The error message tells you that the data file is really empty (in the higher columns).

+1
source

I recently had the same issue using Gnuplot 5.0.4. As Aendur suggested, coding can be problematic. This was fixed for me using TextWrangler to change line breaks , in my case from "Mac Classic (CR)" to " Unix (LF) " without having to change the file encoding to UTF-8.

+1
source

Source: https://habr.com/ru/post/1206289/


All Articles