|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-07 18:56:11
|
On Wednesday 05 January 2005 08:29 pm, Shigeharu TAKENO wrote:
> shige 01/06 2005
> ----------------
>
> In ChangeLog of CVS version:
>
> 2005-01-04 Ethan Merritt <merritt@u.washington.edu>
> ...
> * docs/gnuplot.doc: Correct the documentation to say
> 'set multiplot layout <rows>,<cols>' (rows/cols were reversed in the
> previous version, and mis-described in the example).
>
> I think it is true. Moreover, I wonder the behavior of options
> {column,row}major are reversed. gnuplot.doc says:
>
> This grid is filled rows first or columns first depending on
> whether `rowmajor` or `columnmajor` ...
>
> However, in columnmajor (default), first two graphs are placed in
> the first "row" from left to right. Is it correct behavior ?
I think you are right, and the current behavior is incorrect.
I will interchange the behavior of the two options unless
someone here proposes a different solution.
Short answer
------------
Standard mathematical terminology for arrays is A[row,column],
so that "row" is the first index.
The standard definition of "column major" is
"elements that differ only in their first index are contiguous".
In other words, "the first index varies fastest".
So indeed "column major" means that successive entries should
fill one column before continuing in the next column.
Longer answer
-------------
Some programming languages (e.g. C) and some application
communities (e.g. image processing) choose instead to refer to
arrays as A[column,row]. That is, the words "row" and "column"
now correspond to the 2nd and the 1st index respectively.
In this case "column major" still means "1st index varies fastest"
but the 1st index is unfortunately called "column" rather than
"row". I have no idea why this terribly confusing choice of terms
was introduced.
So gnuplot's current use of the word "columnmajor" may be
technically correct with regard to internal storage of C arrays.
But the user doesn't care about internal arrays, only about
the appearance of the output page. We should change it to match
the output page.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|