- status: open --> closed-accepted
- Group: -->
This patch set increases the number of independent parameters (dimensions) handled by "fit" from 5 to MAX_NUM_VAR, which is currently 12. In order for this to work, MAXDATACOLS is increased to MAX_NUM_VAR+2.
Changes to current behaviour:
The names of the independent fit parameters can be set by "set dummy"
(actually this change is in 4.7 CVS already)
Only the first 2 dimensions, "x" and "y" by default, use the axis
structures. So calling 'set xrange' or 'set yrange' can affect the
fit by limiting the range of coordinates that are accepted, just as
with the current version. However, there is no connection between
independent parameters 3, 4, ... and any axis ranges or structures.
For this same reason time data can be given for the first and
second dimensions but not for any additional dimensions.
There is a demo "fitmulti.dem" written by Hanno Hoffstadt that
illustrates fitting up to 6 independent variables.
Variants of this demo are already in CVS for 4.6 and 4.7, but of
course until you apply this patch set the demo only works for up
to 5 independent variables.
The dimensionality of "fit" can be further increased simple by
increasing MAX_NUM_VAR in syscfg.h, but if we decide to do that
it would be nice to make the c_dummy_var[][] and set_dummy_var[][]
into pointer arrays rather than fixed-size storage for long variable
name strings that will never be used. E.g. #define MAX_NUM_VAR 100
increases the size of gnuplot by 2%, whereas if these were pointer
arrays the size change would be effectively zero (actually I think
it would shrink since the current arrays are already a waste).
This patch does not take into account the proposed changes in patch #621 that implement error terms for each separate dimension. Well, except insofar as that fit mode would require handling twice as many data columns and the current patch makes it easy to increase the maximum number of data columns further.