2
votes

Good Morning every one,

I'm trying to print different curves with GNUPlot.

Here is my csv.

HP1,HP2,HP3,HP4,HP5
1703808,5175328,3337168,5696107,5708256
1107150,4364912,2324679,4475785,4830227 
2036,2844,16426,3336,3466
1393,2114,1898,2427,2878 
836,1678,1584,1288,1549 
448,835,441,934,1262
389,546,390,871,616 
38,86,64,101,97

I can graph on curve with this command :

plot "my_file.csv" using 0:1 with lines

I've on line and if i tried 0:2, it prints this error

warning: Skipping data file with no valid points - x range is invalid

Can someone help me ?

Thank you.

1
Possible duplicate of Having "automatic" xLanting

1 Answers

4
votes

You should first tell gnuplot that you have a .csv file:

set datafile separator ','
plot "my_file.csv" using 0:1 with lines

Then it should work fine. More details here.