How can I use gnuplot to plot data that is in an un-friendly format?

Posted by Zack on Stack Overflow See other posts from Stack Overflow or by Zack
Published on 2010-04-29T13:56:54Z Indexed on 2010/04/29 18:27 UTC
Read the original article Hit count: 290

Filed under:
|

I need to graph some data that is not exactly in the most friendly format, most examples or usage puts things in a nice column/table that is very easy to parse and graph. However I have the following format (and am a bit stuck as to how to tackle this):

DATE1 label_1 xx yy
DATE1 label_2 xx yy
DATE1 label_3 xx yy

DATE2 label_2 xx yy
DATE2 label_3 xx yy

DATE3 label_1 xx yy
DATE3 label_2 xx yy
DATE3 label_3 xx yy

DATE4 label_2 xx yy
DATE4 label_3 xx yy
...continues

*I've added the extra space between the dates for readability.

**Note: under DATE2,DATE4 label_1 is missing, i.e. the data file may have labels that come and go and should represent a discontinuity in the graph.

I'd like to have the X-axis use the DATEX for the labels, and then create two lines for each label (xx and yy respectively).

Does anyone have any suggestions on the best way to tackle this problem?

© Stack Overflow or respective owner

Related posts about gnuplot

Related posts about plot