|
From: Petr M. <mi...@ph...> - 2005-10-22 21:55:32
|
>> no, x = $1, y = $2 (autogenerated row and column index of
>> the matrix)
>
> Apparently that is how the program currently interprets
> $1 and $2. I dind't know that.
> It is very confusing because it is not consistent with all other
> plot/splot "datafile" commands. In all other cases $1 means
> column 1 of the file, regardless of whether it is being used as
> an x value.
It's not confusing, because you specify the "matrix" keyword. Same for
(the new) "binary" stuff.
> But I would like to provide a more logical syntax for this
> operation, so that this confusion isn't necessary.
> splot 'matrix.dat' matrix using (1+$1/100):(1+$2*10):3
> as
> f(x) = 1 + x/100
> g(y) = 1 + y*10
> splot 'matrix.dat' matrix xticlabels(f(x)):yticlabels(g(y))
>
> Would that be more natural?
>
> Alternatively, we could allow dummy variables in the using specs
> directly:
> splot 'matrix.dat' matrix using (f(x)):(g(y)):(z)
> Unfortunately that has no obvious meaning for non-matrix plots.
I would stay with my proposal
splot 'matrix.dat' matrix using (1+$1/100):(1+$2*10):3
For me, it's easy to understand, and consistent with "binary".
---
PM
|