|
From: Hans-Bernhard B. <HBB...@t-...> - 2013-06-15 22:14:23
|
On 14.06.2013 08:46, Bastian Märkisch wrote:
> Am 12.06.2013 23:29, schrieb Ethan A Merritt:
>> It looks to me that the only reason the axis data structures are involved
>> is that routine parse_range(), which used to be macro PARSE_NAMED_RANGE,
>> takes an axis index as input parameter and overwrites the
>> autoscale/min/max fields in that axis structure.
In a nutshell: data file reading refers to axis data structures (-->
global df_axis[]), e.g. for time/date data handling and pseudo files '+'
and '++'.
Fit has to read data. So fit has to set up at least some semblance of
axis data structures. And currently, those have to be in the main
axis_array[] because that's the only one handled by interfaces using an
AXIS_INDEX argument (including df_axis[]). But that axis_array[] can't
be extended all that easily, if only because its entries are presented
to the user by way of names ("x1", "z", "cb", ...), not numbers.
> The fitting code itself certainly does not have a restriction to the
> number of indep. variables. Hans-Bernhard, any comments?
I wouldn't know. It wasn't me who lifted the original restriction of 2
independent variables, which used to be the same as with all other
commands in gnuplot: 2. I didn't study James Van Zandt's changes in detail.
The restriction is ultimately in how ranges are handled in gnuplot.
Ever since the big "axis array" change in year 2000, a range has been a
internal property of an axis, and thus completely handled by code in
axis.c/axis.h. This worked well as long as fit tried to model its
behaviour after (s)plot, including its number of independent variables.
Variable ranges for 'fit', e.g., are parsed by axis.c::parse_range().
But if we want 'fit' to support more independent variables than any
other command in gnuplot (which it already does), or even support an
unlimited number of them, that whole concept of
one indepentent variable --> one range <--> one axis
will have to be given up and replaced by something else. And that
change would affect not just 'fit', but also 'plot', 'splot' and a good
deal of other commands. Ranges would get a data structure of their own,
and axis would point to (or contain) such a range struct.
|