|
From: Ethan M. <merritt@u.washington.edu> - 2009-11-22 04:03:46
|
On Saturday 21 November 2009, Philipp K. Janert wrote:
>
> I am not sure how the "matrix" keyword works
> (that is: is supposed to work) when used together
> with the plot (not splot) command.
I share your confusion.
> Can you help me to enumerate the legal uses?
>
> For splot, there seem to be two legal ways to use
> matrix:
>
> splot "file" matrix
> and
> splot "file" matrix u ($1):($2):3
In addition, ascii matrices and binary matrices are treated
very differently according to the docs.
> The first assumes the values in the file to be z-values
> on a regular grid.
>
> The second assumes that the z-values are in "column"
> 3, and allows me to fix the x- and y-coordinates through
> the "columns" 1 and 2.
>
> Is it legal to do either:
>
> splot "file" matrix u 1
> or
> splot "file" matrix 1:2
>
> And if so, what do either of them do?
>
> For plot (not splot), I am completely confused. Does
> it even make sense to have the notion of a "matrix"
> format for plot? The "matrix" keyword seems to suggest
> that the data is on a regular, 2-dim grid. This notion
> does not seem to have any meaning for plot.
It is clearly useful to have such a capability.
I use it to make heat maps, for instance.
See heatmaps.dem
But whether I use it in the way orginally intended is another
question :-)
Another bizarre property is that the following command can be
used to plot the values in a row of data rather than a column
of data, which is otherwise "impossible" in a normal gnuplot command:
plot 'rowdata' matrix using 1:0
I suspect this was totally unintended. At one point I tried
to figure out if this was generalizable, but I got too confused
and gave it up.
|