Home > Back-end >  Plotting CSV file with gnuplot returning line 0: x range is invalid
Plotting CSV file with gnuplot returning line 0: x range is invalid

Time:12-10

My CSV file looks like this:

Sections,Score
text,5.80653548846
rdata,3.96936179484
data,0.378703493488
pdata,1.97732827586
rsrc,2.81352566021
reloc,0.46347168954

I'm running the command:

gnuplot -p -e "set datafile separator ','; plot '/temp_files/iMiHRlrcQLwWYXjbjmTydBITw_PlotGraph.csv' using 1:2 with lines;"

And I'm getting the error:

line 0: warning: Skipping data file with no valid points

set datafile separator ','; plot '/temp_files/iMiHRlrcQLwWYXjbjmTydBITw_PlotGraph.csv' using 1:2 with lines;
                                                                                                                                                ^
line 0: x range is invalid

I've tried the following:

  • Editing the CSV file to not contain the Sections,Score part.
  • Setting the ylabel and xlabel with set xlabel "Sections"; set ylabel "Scores";
  • Running set title "Entropy"; set grid; plot "FILENAME"; using 0:1 with lines
  • Using the suggestions from these posts: enter image description here

  • Related