
Updating Graphs

lin
I would like to create a graph inside an existing window which was created as follows:
DoWindow/F Window1 <br /> Execute "Window1()"
where
Window Window1() : Panel<br /> NewPanel /W=(230,53,881,791) as "Window1 Title"<br /> ...<br /> Display/N=graph/HOST=#/W=(30,377,629,723)<br /> EndMacro<br />
If I understand correctly, this creates a graph inside the panel 'window1' (the currently active window) with name 'graph'.
I am then trying to append traces to this graph from another function via
AppendToGraph/W=graph wave1 vs wave2<br />
which throws the following error
While executing ApendToGraph the following error occured: there are no graphs or the specified graph does not exist.
If I change the AppendToGraph to the following line
AppendToGraph/W=# wave1 vs wave2<br />
everything works fine. However, on repeated execution of the function, the graph does not update? Also is there a way to empty the graph (i.e. to remove all appended traces?).
Any help is much appreciated :).
Thanks,
lin
Even if it's working, have you also tried this ? :
Sometimes, the
SetActiveSubWindow
instruction may be useful too.Regarding the other stuff, I think your problem is that you always append the traces, even if they have already been appended.
I would suggest to define a boolean variable to know if the trace was already plotted or not.
So that, no need to explicitely update anything.
Best Regards
September 16, 2011 at 06:31 am - Permalink
September 16, 2011 at 07:46 am - Permalink
AppendToGraph/W=$fullPath ...
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 16, 2011 at 11:56 am - Permalink