Note: I can control the format of the data file, but it has to be a single file.
I'm trying to plot multiple datasets on the same graph using gnuplot. I'd like ideally to plot something like this:
data_1 0 0
data_2 0 0
data_1 1 1
data_2 0 1
data_1 2 2
data_2 1 2
And so on. In this case, data_1 and data_2 should be two separate curves.
I'd also like to avoid putting in the gnuplot script the list, or even the number, of possible datasets. Basically, I'd like it to "group" data points by a specific field, and plot each group as a separate dataset on the same graph.
As a last-resort alternative, I could split the original file into one file per dataset using grep, and plot those (I guess it's easier?), but I'm looking for a way to do it with a single file.


