|
From: Juergen W. <wie...@fr...> - 2009-03-09 15:00:25
|
> I'm trying to use table header for title, but this fails to work:
> plot for [n=2:26] 'mydata.dat' using 1:n title n with lines
> raising an error
> expecting "title" for plot
>
> "title 2" works OK but I can only get a single label with that, "title
> sprintf("%d", n)" would also help in some cases, but not this time
> since the label I need is not a linear function of column.
>
> lines 110-112 (may vary from the latest version) in datafile.c say:
>
> } else if (!END_OF_COMMAND && isanumber(c_token)) {
> column_for_key_title = int_expression();
> } else /* Let the general case parser handle it */
>
> Can someone please give me a tiny hint if there's a way to use labels
> from column headers with loops?
From the code a few lines above the snippet you've shown:
plot for [n=2:26] 'mydata.dat' using 1:n title column (n) with lines
> As a fallback I can still copy-paste dozens of lines and specify
> number for each column separately, but that's a bit tedious.
>
> Thanks a lot,
> Mojca
Juergen
|