I am somewhat new to gnuplot
iteration. Its a geat feature, but I and trying to find a good way at entering the multiple titles to 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 w l
then gnuplot prints the graph with the header, great!
But I want to plot all the data on the same graph, so I type
plot for [i=2:4] "./mydata.txt" u 1:(column(i)) w l
This plots the data but not the title.
Does anyone know a way of getting these features to work togeth开发者_开发百科er, or do I have to go back to the old way of typing out every plot explicitly (i.e)
plot "./mydata.txt" u 1:2 w l, \
"./mydata.txt" u 1:3 w l, \
"./mydata.txt" u 1:4 w l
I couldn't figure it out either until by fooling around with the syntax accidentally, this
plot for [i=2:4] "./mydata.txt" u 1:i w l
is working.
I didn't find any reference to this behavior in the documentation, so this might be a glitch worth reporting...!?
精彩评论