(I wouldn't be suprised if this is a duplicate, I can't find the right search term to find it though)
I have a data file of the form (simplified a bit):
date time label value
2013-03-17 10:09:28 thing 1 54
2013-03-17 10:09:32 thing 2 20
2013-03-17 10:10:02 thing 3 35
2013-03-17 10:10:03 thing 1 59
2013-03-17 10:10:21 thing 1 64
2013-03-17 10:10:37 thing 3 37
2013-03-17 10:10:37 thing 2 40
2013-03-17 10:10:42 thing 3 41
2013-03-17 10:10:44 thing 2 59
...and what I want to do is create a multi-line plot, each of 'thing 1', 'thing 2' and 'thing 3', and have Gnuplot automatically label them accordingly.
If I split the file into separate datasets, one for each label, then I know I can do a multi-line plot like this:
set timefmt '%Y-%m-%d %H:%M:%S';
set xdata time;
plot 'thing1.txt' using 1:3 title 'thing 1', \
'thing2.txt' using 1:3 title 'thing 2'
...however this seems to be overkill. Can this be achieved with Gnuplot without having to split the file into separate files-per-dataset? In reality there's about 200 separate labels, so if Gnuplot can automate the labelling it will save a lot of manual pre-processing of the data.