I am a little new to gnuplot iteration . Its feature is geat, but I'm trying to find a good way to enter several titles into the plot.
My data is in the form;
xdata data1 data2 data3 data4 1 1.1 2.2 3.3 4.4 2 0.1 1.1 2.2 3.3 3 4.2 5.2 6.4 3.7
If i type
set key autotitle columnhead plot "./mydata.txt" u 1:2 wl
then gnuplot prints a graph with a headline, great!
But I want to build all the data on the same chart, so I type
plot for [i=2:4] "./mydata.txt" u 1:(column(i)) wl
This displays the data, but not the header.
Does anyone know a way to make these functions work together, or do I need to go back to the old way of entering each plot explicitly (That is)
plot "./mydata.txt" u 1:2 wl, \ "./mydata.txt" u 1:3 wl, \ "./mydata.txt" u 1:4 wl
source share