|
From: Tait <gnu...@t4...> - 2015-12-11 00:04:35
|
> <1>. Multiple keys
> ...
> set key 1 top right
> set key 2 bottom left
> plot 'data' key 1, '' key 1, '' key 2, '' key 2
>
> Thus, if I have many legends and there's no space to put them together,
> I can divide them into two groups
> "key 1" and "key 2" and put them at different places.
Don't labels (as in, "help set label") offer a more flexible and
comprehensive solution to this problem?
> <2>. Multiple files
>
> Columns from different files can be calculated together. e.g. I have two
> files that have the same format, say, 100 row of (x, y) data, named
> 'file1' and 'file2'. Now I want to plot the different between y columns
> from the two files.
>
> plot 'file1' using 1:($2-column('file2',2)) with lp
There's more that goes into selecting data from a file than merely a
filename and column. Consider "every" and "using", for example,
which are tied with a line, not with a file. This request would
almost seem to demand a cached "virtual column" data structure that
could be populated with arbitrary combinations of
file(s)/every/using/timefmt/etc. and then be given to plot as a
source.
On the other hand, facilities already exist outside of gnuplot to
combine columns from multiple files (e.g. paste, col, or even awk,
bash, perl/python/etc). Small, separate tools are free from the
constraints of gnuplot's syntax and data structures. Languages have
the power to implement any transformation possible, not just a small
handful of pre-imagined example scenarios. And gnuplot can even
invoke these outside utilities, inline, with the plot command via
the "plot '<command'" syntax. I can't see a way to combine multiple
files into a single line without syntactic complexity, hard-to-test
(and hard-to-maintain) combinations of keywords, and backward-
compatibility-breaking changes. Especially when there's
already an existing solution, it doesn't seem worth it.
|