Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trouble making time-based graph with gnuplot

the data file i use looks like this:

2012.07.21  83
2012.07.22  54
2012.07.23  122
2012.07.24  104
2012.07.25  97
2012.07.26  114
2012.07.27  97
2012.07.28  83
2012.07.29  60
2012.07.30  106
2012.07.31  75

this is a short part of it and the file contains other years too. i want a graph that shows the number by dates.(that shows how many results per day)

what i have done is :

gnuplot> set xdata time
gnuplot> set timefmt "%Y.%m.%d"
gnuplot> plot "sample.txt"

but it says : need full using spec for x time data

what have i done wrong? any suggestions? i'm kinda new to gnuplot so i don't know what to do

any help would be great. thanks in advance!

like image 333
H.Choi Avatar asked Aug 23 '12 08:08

H.Choi


1 Answers

Just add using 1:2 to your plot line.

like image 98
choroba Avatar answered Sep 21 '22 22:09

choroba