I want to plot JCAMP-DX formatted spectrum. It has multiple records for y axis in one row and specified increment for x axis.
Simple example: linear plot (1,1) to (12,12)
1 1 2 3
4 4 5 6
7 7 8 9
10 10 11 12
First column represents x axis and second to fourth column represent y axis with each consequent y data belonging to x incremented by one. I can plot it with command:
plot "test.gnuplot" using 1:2 linecolor "black" with dots, "test.gnuplot" using ($1+1):3 linecolor "black" with dots, "test.gnuplot" using ($1+2):4 linecolor "black" with dots
However, the spectrum is much more complicated and I would like to plot it with lines, which is not possible using above mentioned method (lines wouldn´t connect and would create ugly intersections at nonlinear regions of plot).
For now I plot just the second column (using 1:2
), but that lowers the resolution.
I want to avoid using external filters (awk etc.) and editing the input file (vim etc.).
real data (skip first 35 lines -- data specification): http://webbook.nist.gov/cgi/cbook.cgi?JCAMP=C7664417&Index=1&Type=IR