|
From: Teo S B. <teo...@gm...> - 2010-02-13 22:46:51
|
On Sat, Feb 13, 2010 at 8:06 PM, Ethan Merritt <merritt@u.washington.edu> wrote: > On Saturday 13 February 2010, Teo S Bernhard wrote: >> On Fri, Feb 12, 2010 at 7:07 PM, Ethan Merritt <merritt@u.washington.edu> wrote: >> > On Friday 12 February 2010 09:58:45 Teo S Bernhard wrote: >> I have looked into the code, plot2d.c, regarding this issue. I have a >> suggestion for a patch that seems to: >> 1) solve referred Bug #2907028 >> 2) also allow trailing assignments to the plot command. >> I have tested it on small examples similar to those presented in this thread. >> Review and comments on the conceptual idea as presented below in a >> diff-form are appreciated. > > The first pass is used for plotting data, > the second pass is used for evaluating functions. > If you disable definitions in the first pass, > you break plotting from a file. Consider > > plot col=2, 'data' using 1:col with lines > > If you want to pursue this, you will need to use test cases > that mix both function plots and data plots. > I see , thanks for pointing this out. Out of curiosity - is there any way that an approach as the following could succeed? a) at start of first pass, copy the the original "namespace(s)" into temporary one(s) b) use the temporary "namespace(s)" during the first pass c) change back to the original "namespace(s)" in the second pass By "namespace" I mean the structures that hold the variables and functions that are changed when parsing the plot command, Particularily, or perhaps only, those changed by the call to define(). Since these structures are not an argument to define(), am I right in assuming that these are global structures - of unknown name(s) to me, but structures defined in eval.h and eval.c? Thanks for your help. |